configure: fix terminfo check

On Linux, the check fails because NULL is not defined. Fix by using 0
instead, which is a perfectly valid null pointer constant, but doesn't
require stddef.h.
getch2: Support ESC keypresses again

Due to the termcap matching and the hardcoded fallbacks, the ESC keypress
has to be followed by another non-matching keypress (such as another ESC)
for it to be accepted. We drop the second ESC in case it was typed twice.
options: simplify --correct-pts handling

Remove the (now unused) code for determining correct-pts mode based on
the demuxer in use. Change its description in the manpage to reflect
what this option does now.
getch2: fix compilation
getch2: Handle setupterm errors

setupterm abort()s if it can't initialize the terminal and the last
parameter is NULL; handle setupterm errors and retry with "ansi" if
the TERM env var was unset.
getch2: Only send ESC if it was typed twice

Avoids quitting mpv if any unknown escape is entered.
Merge remote-tracking branch 'origin/master' into lua_experiment