Add support for IPv6

IPv6 support can be enabled at compile time using ```-DENABLE_IPV6=1```.  In
IPv6 builds, two new configuration options are added:

* "enable_ipv6" to enable/disable the overall use of IPv6
* "ipv6_server" to enable/disable the use of IPv6 sockets when running a server (when "enable_ipv6" is enabled)

Please let me know if there is anything that I should revise.  Also, this has not been tested on Windows, but it should work.