Adding undo and redo.

This involves adding transactional semantics to all commands that modify
data.  This is explicitly *not* optimized right now, but is instead as
simple as possible.  If it proves damaging in the immediate term, we can
easily bound the size of the undo/redo stack.
Merge pull request #59 from pythonesque/undo

Adding undo and redo.