Added basic undo support
Added public undo function to simulator
Machine state is now tracked by the undo stack
Fixed bug where undoing all the way would prevent executable from running