[432931] Force option to avoid Xtext concrete syntax validation

Add a specific saving policy (XtextSavingPolicy) which is wired in the
sessions using a Session manager listener to force the use of the Xtext
option to ignore concrete syntax validation during save.

This change expose a new method: Session.getSavingPolicy() which is used
by the XtextSavingPolicy to get the previous one in order to be able to
delegate to it.

Bug: 432931
Change-Id: Idc43ab8648d40abfbf23ef3354e1665ae863650b
Fix NPE when opening a diagram

There is quite often the case in EcoreTools that some resource targets
another resource which is not in the ResourceSet. It got resolved
directly using the EPackage registry. In those cases I often ends up
being unable to open a diagram because of an NPE: Sirius use the current
EObject to retrieve the editing domain and the current EObject in this
case might be an EObject from Ecore.ecore itself.

In particular
SubDiagramDecorator.shouldHaveSubDiagDecoration(DRepresentationElement)

will query for associated representations on every instance which is
getting displayed, in some case EAttribute for instance.

With this change the call will not fail with an NPE and will retrieve
the representations.

Change-Id: Ie8dd90c9a84dbca28f019360fbffd279eddb3f35
[431359] Remove inheritance to GMFResourceFactory

The little code we needed was directly copied in our own
AirDResourceFactory.

Bug: 431359
Change-Id: I53d1e59d8365d9e2c6ee3019a27090cc0791535f
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
[431359] Remove inheritance to GMFHelper

The little code we needed was directly copied inside
RepresentationsFileXMIHelper.

Bug: 431359
Change-Id: I54a4b55b2dbfd67c7de654d32da0e5c0726bd320
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
[427017] Correct a detected NPE during tests

With manual refresh enabled, the style figure can still be there even if
there are no more style element.

Change-Id: I2f3818c7f16ec65acbc8e127452617ba2872a0ac
[427017] Remove AirdCrossReferenceAdapter

This was a "content adapter" which installs itself on all elements of
the resource. It was made to customize GMF's own
org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter.

However considering the way we use GMF, we do not need this adapter at
all. To detect when GMF install it (as a collateral damage of the use of
a command, policy, API, ...), some checks have been added in the
abstract JUnit and SWTBot test cases. Thanks to this, our calls to
ViewUtil.destroy(View) have been detected, these calls are not needed
with Sirius: a simple EcoreUtil.remove() is sufficient in the detected
case, then the DanglingRefRemovalTrigger will do the same cleanup than
ViewUtil but without the installation of the GMF CrossReferencerAdapter.

Bug: 427017
Change-Id: I0fe6e43b8ecff1334e29e50ca550dfea37a1e520
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>