UndoManager: remove #if 0 sections

The code will be moved to a branch.