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.