[repository] Drop the entities.extid column and associated cache
This was not necessary anymore with promoted usage of the new data import API.
Turn repository's _type_extid_cache to _type_cache with only the entity's type
as key.
This introduces an backward incompatible change: entity_metas dict doesn't
contains anymore the extid key, but it doesn't seem used at all anywhere, so
this sounds acceptable.
Closes #15538317
# Check the CW versions and add the entity only if needed ?
add_entity_type('CWSession')
rql('DELETE CWProperty X WHERE X pkey "system.version.pyramid"',
ask_confirm=False)
sql('DROP TABLE moved_entities')
sql('ALTER TABLE entities DROP COLUMN asource')
sql('ALTER TABLE entities DROP COLUMN extid')