[512800] Cleanup the Genmodels before reconciling with the Ecore models

The GenXX.reconcile() methods from EMF are relying on the fact that the
ecoreFeature, ecoreClass or ecorePackage references are proxies to
remove the corresponding GenFeature, GenClass or GenPackage. 
Problem is that when this is edited in "live" in the context of
EcoreTools this is not the case when an element is moved as the Java
reference still holds.

This commit introduce a "cleanup" phase which remove any GenPackage,
GenClass or GenFeature for which the ecoreXX reference eContainer() is
not matching with the ecoreXX reference of their own container.

Bug: 512800
Change-Id: I55f99468619b3a7c48d2ea4b61bacff665e1a2dc
2 files changed