Simplified algorithm, made behavior model vims.

The algorithm has been significantly simplified, but this required a new
function: "cursorIsBetween(cur1, cur2, cur3)", which seems like a handy
thing to have around anyway.

Also, [' and ]' jump to the wirst non-whitespace char on a line
regardless of whether a mark was found. (This is the behavior of vim 7.)