fix socket error when gui is prematurely closed
preparing for resilient restart

functions that can fail with just
a return value get the "unsafe" name,
and can use them to "detect" if the
program being debugged exited while
we are waiting for another breakpoint.
continue button mostly works

I was hoping that write(3) would return
a serious error when writing to a socket
that had been closed by the debugged
program. we'll have to try something else...