zsh: rejigger some of the key binding code

Let's put the setup of the keys into it's own function.  Later, we'll
set the same bindings for both application and keypad transmit mode.
zsh: make the movement keys work the same in both modes
zsh: tie in zle-line-init/-finish so that they're actually called
zsh: use history-beginning-search-backward/-forward

Apparently, up-/down-line-or-beginning-search don't work as advertised.
There's a call in there to move the cursor to the end of the line, thus
screwing up the ability to add more characters to the search.  This only
became apparent in newer zsh installations due to some configuration set
up by the distros.