Adding tests for undoAll / redoAll

Tests for mixing undoAll / redoAll with regular undo / redo
Fixing problems of undoAll / redoAll

Fixing the severe problems caused by mixing undoAll / redoAll with
regular undo / redo calls