Close the socket properly when using WinSock.
Add include guards to headers.

Even though they are pointless in this particular case (these aren't
public headers, and they are never included twice), this could make
somebody happy.