Make gui.Caret, gui.UndoManager and ops.Operation 100% typed.
Make gui.TrivialUndoManager and gui.UndoStateRules 100% typed.