Undo redo

Initial implementation of undo-redo for treema.
It seems to work fine for most actions I tried in the treema (deleting, editing, adding nodes, changing node types).

I'm not sure about the code, it's not very clean, and probably can be more efficient as well.
@sderickson  It'd be great to have some feedback about stuff I might have missed, and anything else really.

If this is fine, I'll begin implementing it for the level editor.
I use chrome console to debug and test it out, adding keyboard shortcuts in treema itself didn't make much sense.
For scratch.html, just call - 
1. treema.undo() for undo
2. treema.redo() for redo