Undo/Redo—initial implementation

WYMeditor's undo is, in some cases, not accurate.
Two new functions. The link and image dialogs used to hold this functionality inside of their own code, as anonymous functions. That did not make it easy to cover that functionality with tests. These two new functions replace those unnamed ones and are now covered with tests.