Fixed up debugserver $k response to use X rather than W.
Stop SIGHUP from client from coring llgs.

Modify SIGHUP handler to set a flag that exits llgs.
Flush inferior terminal output before inferior exit.

Before this change, it was possible to get a $O for an inferior
with terminal output monitored (i.e. for processes launched from
llgs) to be sent *after* the inferior termination sending message.
This would happen if the thread timing of the inferior terminal
reader happened to drain the output after the waitpid or main
thread handled the $k or PTRACE exit notification.

This change adds a GDBRemoteCommunicationServer::FlushInferiorOutput()
method that joins the stdout/stderr reading thread if there is one.
It should be called only after the process has either indicated
it has terminated, or a termination has been set in motion for
the inferior.  This method should utilize a timeout mechanism.
The underlying Communication::JoinReadThread() does not currently
have a timeout for the join operation, but this should be added
in the future.