Undo/redo engine for plain text and wxPython TextCtrl.