Fix for critical defect MAGN-190

1. Fixed MAGN-190 (Crash on undoing an action that deleted two nodes with a connection)
2. Undo and redo operations are now done in the exact reversed order
3. Added test case "TestDeletionsUndoRedo" to ensure simultaneous model deletion can be undone/redone correctly