Enhanced undo function for imagerecorder

Should now be able to cope with undo points, saving the current image
and length of the log string.

- Undo button will cut off the log string when pushed
- Reset button will preserve the necessary header tags when pushed
- Undo button should be possible to use for more actions than just
stepping back one image.