Reset history position on user interrupt

When the user presses ctrl-C, the history position should be
reset to the end in order to match the behavior of readline.