Constrain both the anchor and cursor nodes when fixing cursor positions after an operation

Adjustments to the cursor position when near paragraph boundaries was causing
the selection length to incorrectly change, or the anchor to skip to the
following paragraph (see added tests).

Now, both the anchor and cursor are treated identically when "fixing" the
cursor selection after a document modification.
Condensed countBackwardSteps & countForwardSteps into countSteps on SelectionMover

Most consumers of this interface were re-implementing a "countSteps"
equivalent.