Added support for undo/redo of selection which seems to be combinable
with plotting undo/redo.

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