Fix Issue 158: Problems with redo/undo and rotated elements.  Refactor of code for Issue 170.
Fix Issue 158: Problems with redo/undo and rotated elements.  Refactor of code for Issue 170.
korya/svg-edit,korya/svg-edit,korya/svg-edit,korya/svg-edit,kvasilov48/SVG-edit,kvasilov48/SVG-edit,kvasilov48/SVG-edit