Harden asInstanceOfOpt to be robust for nulls or reflection crashes.
Don't create a reconciler for non-editor source configurations.

In the Syntax Coloring preview pane we create a source viewer without an
editor. The reconciler needs an editor to get to the compilation unit, so
we don't attach a reconciler in this case (there won't be any editing).

We might need to revisit this if we ever want to use a source viewer outside
an editor (with reconciliation capabilities).
Correct completion overwrite behavior when nothing is overwritten

This fixes the problem only partially because it is based on a
heuristic, but it should fix the most important cases.

The logic is overall very complex, nevertheless no tests are provided
because there exists no test suite that can test the contents of a
document after a completion happened and writing such a test suite is
not trivial.

Fixes #1001791