[xtext][ui] Fixed document test

Also added a means to attach listeners for arbitrary
XtextEditor events (ObservableEditorCallback)

Change-Id: Ie88f579cba70629202e296d7ae54687824d12a65
[xtext][building] Guard against disposed natures map

This should prevent NPEs.

Change-Id: I77d54ee111d0fc34cb0a5ff1261926fcfe221734