SOCKET changes (CSocket RAII etc.)

1. commit: cleanup use of CloseSocket()
-- call CloseSocket() before printing any text (ensure consistent
  usage in the code), exception is when using NetworkErrorString()

2. commit: add CSocket (RAII class that provides access to a SOCKET)