Add utility method safeAddModelOffset.

This helper function tests if an offset change will put us in the
middle of a newline sequence by checking the line information of the
next or previous lines.
Selection marks now support exclusive selection.