Add UndoManager.forgetHistory() method.