[schema deserial] fix loading of schema when mapping an entity type to an existing one
To ensure rdef of the old entity type don't overwrite those already existing
on the mapped entity type.
Also rename some variables/arguments on the way to make things clearer.
[migration] more rename_entity_type fix
* ensure repository caches and system tables are properly cleanup
* delete relations from/to entities deleted through sql
So we don't ends up with a corrupted db...