getch2: Remove unused function, fix possible crash

If we still haven't read the full key from the input but it's regardless a
unique match in the database, we could receive a NULL keycode from
keys_search (it's not a full match after all) and proceed to use it.

Don't disable the keycode matching code if we don't have termcap as we can
still match against the hardcoded sequences.
getch2, mplayer: Always call load_termcap

getch2 now deals with the cases where we don't have termcap. Add a dummy
load_termcap to getch2-win so we don't get linking errors on mingw.
configure: Fix bad variable assignment

Bourne shell hates having spaces before or after the = sign.