[repo] fix extid2entity to ensure connection's has a cnxset
else we'll call source.doexec, which attempt to access to cnxset.cu, and crash
in some case (eg unittest_cwxmlparser in sobjects/test).
Also, manually switch to 'write' mode to ensure cnxset is not released until
commit/rollback when some entity is inserted.
sync_schema_props_perms('cw_source', syncprops=False)
if schema['BigInt'].eid is None:
add_entity_type('BigInt')