include changesets.js
commenting tweak to changesets
Implement OT updates

When updates come in for the active document, use changesets.js to
transform them against our (uncommitted) changes.

Document format in the DB is back to a single string, with embedded "\n"
characters for linebreaks.  The content paragraph has style
"white-space: pre" so these get rendered correctly.  Differing
contentEditable insertion behavior in Gecko and Webkit makes this the
best choice, I think.

A big chunk of this was maintaining cursor position across the change.
This is done by adding a "\xff" character at the cursor position,
running the change, and finding the character afterward.  To set the
cursor location, we transform the \xff into an empty span with an id.

Many bugs may still lurk.  Currently, selection location isn't checked,
so if the cursor is outside the editable region we have problems.
At the moment, we run the transform immediately.  If this causes trouble
while typing quickly, we can change to only running once the save pause
occurs.
TODO: if a save fails due to conflicts, pull & transform and try again.