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.
So, after picking through more things, I've now settled on ``Scanner``. The term is from lexical parsing, a scanner is used to find the next logical token. Scanners can do things such as backtrack, and are generally based on finite state machines... so these are a good fit for this behaviour.