Merge pull request #617 from peitschie/selection-cleanup

Tidyup SelectionController
Re-implement navigate-to-line-boundary cursor movement
Re-implement navigate-by-line cursor movement
Re-implement up/down movements caching the last caret X position

When navigating vi the up/down arrow keys, the user often wants to move
multiple lines in sequence (e.g., to visually place the caret in one of
the following lines). To stop the caret suddenly jumping to the left
side of the page when crossing an empty paragraph, the caret's X position
will be stored and re-used by subsequent up/down movement for up to 2s
after navigating by line.

Any other operations performed by the local user (e.g., cursor movement
to the left or right), or edit operations by collaborative users will
immediately clear the stored X position.