Add a general document interface for use in operations.
The UndoManager and TrivialUndoManager classes are adapted to the generalized interface.