Use a moved_entities table to record external entities moved to the system source
Instead of using a negative eid in the entities table, move the record
to a new table so we don't have an interval with a missing eid in
entities.
Related to #4846892
for table, column in [
('transactions', 'tx_time'),
('tx_entity_actions', 'tx_uuid'),
('tx_relation_actions', 'tx_uuid')]:
repo.system_source.create_index(session, table, column)
commit()