Use asymmetric up/down behavior in history_move_prefix.

@vtjnash this should fix your issues 1) and 4) in #6377. i.e. down arrow will continue from the last accepted history search, but up arrow will always start searching from the end.