Avoid unnecessary readahead early in TTY frame init
We query some properties of the terminal early in initialization, and
just before we do, we perform ordinary redisplay. This redisplay can
result in unsightly flickering if we change some aspects of the
display immediately afterward and redisplay again. By avoiding
redisplay in xquery--query as long as we get timely responses from the
terminal, we can avoid this early unwanted redisplay.
* lisp/term/xterm.el:
(xterm-query-redisplay-timeout): New variable.
(xterm--read-event-for-query): New function.
(xterm--report-background-handler,xterm--version-handler,xterm--query):
Call it.