Fix memory leak; fix undo stack semantics.

The leak was caused by loss of type information once an object was returned by
NewXXX() functions.  Since I reference objects exclusively through their
abstract interfaces, the compiler had no idea to call the object's destructor
at the time of object disposal.  The solution was to make a top-level class
Destructible, which implemented a null, virtual destructor which subclasses can
override as appropriate.

Also, when making a stack, make sure you push and pop from the same end.