Auto-scroll editor to foreign change
When loading the editor for the first time a base
scroll offset is calculated for each foreign diff
change and saved within the diff element.
These offset values are refreshed when the window
resizes and therefore the offset changes.
To calculate that offset a hidden editor is build
that is layouted like the actual textarea but can
provide marked up text.
When loading the conflict page for the first time,
the editor scrolls to the first foreign change.
When clicking on a foreign change the scroll offset
is used to scroll the editor to the corresponding