Text windows only accept a few keys (<escape>, <return>, ':', now
<space>) and if they got other keys they passed those up the call
chain, arriving at the map where they were treated as commands
and were executed while the text window was still displayed. The
cited example was ',' for pickup while the "things that are here"
popup was shown. The 'foreign' key's command might be executed
successfully but the undismissed popup could become hung.
This fixes that ('foreign' keys will be ignored). It also lets
<space> be used to dismiss text windows.
Slightly better but far from perfect: if you perform a search,
then after it runs you need to type <escape> once, or <return>
or <space> twice, or else search again and pick [done] on the
search popup and then <return> or <space> once, to dismiss a
text window via keyboard. (Prior to this, typing <escape> or
searching again and picking [done] followed by <return> were the
only ways.) Also, searching for an empty string will now be
treated as if [done] had been picked.
Fixes#400