Set cursor to the end of the command whenever traversing history

This will make sure that the cursor is at the end of the line whenever you hit up or down, which behaves the same way native irb does.