A reimplementation of NSUndoManager that is highly compatible with the original but much more debuggable.