[SocketClient] Fix connecting to IPv6 addresses

This simple patch adds support for connecting to IPv6 addresses. IPv6 addresses need to be enclosed in square brackets if a port is appended.

Along with a simple test case for SocketClient as well as Socket (ticket #182).