Encapsulates undo/redo logic using a custom undo stack (i.e. not browser
built-in). Browser built-in undo stacks are too flaky (e.g. IE's gets
clobbered on DOM modifications). Also, this allows interleaving non-editing
commands into the undo stack via the UndoRedoManager.
Stores the state of the selection in a way the survives DOM modifications
that don't modify the user-interactable content (e.g. making something bold
vs. typing a character).
TODO(user): Completely get rid of this and use goog.dom.SavedCaretRange.