Finished first revision of undo history handler to support true
sequential execution of commands to undo.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>