Add hashmap to map input key/scan codes with arbitrary modifiers to out seqs.

Currently used approach of using String[256] doesn't scale - the arrays are
sparse, while there may be need to handle various modifier combinations. For
example, cursor directional keys produce different codes for all combinations
of Ctrl, Alt, and Shift - 8 combinations total. So, just use hash table, but
be efficient and use integer as key value. Caveat with this approach is
exactness of much. For (abstract) example, suppose Ctrl+Shift+PgUp combination
is not supported, while Ctrl+PgUp is. Current implementation will however
output code for just PgUp, while it may make sense to output code for Ctrl+PgUp
(but that's not 100% sure).

Mapping if raw scancodes is also supported. There actually should be support for
reading user-defined map from external file, then functionality implemented here
will allow users to perfectly support whatever keyboard they have on their hands,
regardless of Android version, if some keys are supported by Android or not, and
if that support broken or not.
My implementation of proper "application mode" for cursor keys.

This will conflict with https://github.com/jackpal/Android-Terminal-Emulator/pull/266
Add XTerm alt buffer support ("\E[?47h"/"\E[?47l").

Alt buf is used by many fullscreen apps to preserve original contents
of the console. This implementation is pretty basic, byt enough to run
Midnight Commander with proper switching between shell and panels.
Hack-add additional altbug command codes to make less work.

1049 probably should probably clear altbuf after all, but so far, less
itself overwrites entire altbug content itself.
Use XTerm codes for Home/End keys.

TODO: introduce xterm term time, set codes conditionally.
Use num keypad for cursor movement, etc. keys. This allows to have Home key.

On some Android versions, Home key unconditionally used to go to Home screen,
so using numpad in cursor key mode is the way to actually have a usable Home
key still. Then, standalone Home key can be redefined to produce numpad's
key code too to get around ugly Android behavior. For reference:

/system/usr/keylayout/bk/Generic.kl:
-key 102   MOVE_HOME
+key 102   NUMPAD_7