Record command history and register after command.

The command to run was written to history and ':' register right before it was
run. This caused :register to show always the register command as last ex
command. Now the command is written to history and register after attempt to
run it.
Remove input timeout if inputbox was changed meanwhile.

If the user started a command that failed with error state, the input timeout
was started. In case this was followed by a good command that prints output to
inputbox, the output was cleared by the previous set timeout function.
To fix this behaviour, the timeout is removed if the timer was started and the
inputbox is changed.