Redoing an undone image operation (e.g. crop, rotate) does not work.
This is caused by a missing redo() override in the derived
QUndoCommand class.
The patch adds the redo() and moves/adjusts some calls to make
undo/redo work properly.
Additionally adds an autotest for undo/redo in DocumentTest.
FIXED-IN: 18.04.2