Allow lua-functions to be called on keypresses.

  Until now all keyhandling was carried out via the keymap
 table.  Now there is a lua-defined function "on_key" defined.
 If that function exists it will be called on every keystroke
 *BEFORE* our table-lookup.

  If the on_key function returns >0 then further processing
 will be stopped.  Otherwise we'll revert back to the table-lookup.