Rewrite of line boundary movement actions

Rewrite of line boundary detection logic to address numerous cursor movement issues (#555, #405, #227, #225, #224, #185, #124 and #98).

This also removes the last uses of the gui.SelectionMover class, allowing it to be removed in a subsequent PR.
Please add a short explanation what the strategy here is ("go to start/end of current line", "go one step further to reach the other line", "go to position in line which is closest to target xoffset"), so a future reader gets the idea more quickly.