Fix warnings from new version of gcc.
Encapsulate the socket in an ADT.

Create an envelope-like ADT and store the socket's file descriptor in
the ADT instead of using it directly.

This is step one in the process of adding SSL support to meta_socket and
tcp_server.