Push aborted commands to history.

The lines added to input_handler.cc are basically taken from a few lines up.
Maybe it should go in a separate function? Implements #5