Add basic undo/redo

TODO: Support floodfill undo/redo, Clean up, Multilevel support, UI
indication when undo/redo are not possible