Fixes T1561:
- revision_metadata renamed to revision_intrinsic_metadata,
- revision_metadata.translated_metadata renamed to revision_metadata.metadata,
- content_metadata.translated_metadata renamed to content_metadata.metadata,
- origin_intrinsic_metadata.origin_id renamed to origin_intrinsic_metadata.id.
- rename/update functions and affected tests
- add database migration script