Implement visual mode with mappable commands

This PR is a continuation of PR #1275. It implements moded key bindings, and then sets up commands to implement visual mode. This fixes #61.

The visual mode commands take 2 arguments, `direction` and `granularity`, which are the same as the 2nd and 3rd arguments to [`Selection.modify`](https://developer.mozilla.org/en-US/docs/Web/API/Selection.modify):

> **direction**
The direction in which to adjust the current selection. You can specify "forward" or "backward" to adjust in the appropriate direction based on the language at the selection point. If you want to adjust in a specific direction, you can specify "left" or "right".
> **granularity**
The distance to adjust the current selection or cursor position. You can move by "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", or "documentboundary".