fixing undo bug #707

Found that caretUndoStack and caretRedoStack weren't getting caret info pushed to them during edits. The original calls were lost when undo stuff was reorganized; I put them next to the undo.addEdit() call.  Tested on my Win7 64bit machine, works happily for me.