More robust support for Ctrl+Z (undo) in the editor

The ability to undo ALL actions with Ctrol+Z including console commands would be a huge time saver in the editor.