Make history-search-backward/forward similar to readline's version.

This more closely matches the behavior you get with bash/readline.
There is currently a small difference: bash will move the cursor to the
end of the line when you haven't typed any characters and invoke
history-search-backward.  Readline will then remember you haven't typed
anything and continue to do the equivalent of previous-history.

This version leaves the cursor at the beginning of the line since it
would require extra state to determine whether or not characters have
been input or the cursor has been moved manually since the last
history-search-backward/forward.

For those that have history-search-backward and history-search-forward
in their ~/.inputrc files, this more closely matches the expected
behavior.
Merge pull request #118 from jszakmeister/history-search-backward

Make history-search-backward/forward similar to readline's version.