*  Rework WaitForConnect() to fix synchronous completion of asynchronous connections.
  *  Let TcpInputProc() and TcpOutputProc() fail before calling any I/O syscalls when an asynchronous connection has failed.
  *  Adjust the tests accordingly.