Genie:  Uninline TerminalHandle::setpgrp()
Genie:  Send SIGHUP again to each successive pgrp

On hangup (i.e. closing window) we send SIGHUP to the foreground process
group of the terminal.  Also send SIGHUP when setpgrp() is called with a
new process group, so that the teletype process will be killed after the
shell exits, and the window will close.  (Currently, a failed write() is
used to indicate to teletype that the terminal is disconnected.)
Genie:  Don't fail I/O to a disconnected terminal
teletype:  Don't check for a disconnected terminal

We'll get SIGHUP when we call tcsetpgrp() if that's the case.
Merge branch 'window-HUP'