We use a diff to be able to transform the buffer into an arbitrary
string (usually when we reread the file after an external program such
as gofmt has changed it) and still preserve undo/redo.
Fixes#136
This is better design because the cursor and eventhandler are things the
buffer should know about directly but the view shouldn't. This should
make it easier to add persistent undo or location saving between
sessions (see #107).