Strip square brackets when creating IPv6 sockets

The current code base tries to pass the site.host field unmodified when creating a new socket.  For IPv6 hosts, the IP address is wrapped in square brackets which the TCPSocket object does not understand.  I've made it so that such references to hosts in the create_socket() method use sanitized versions of the host information instead of the raw info.