Support IPv6 in address check lookups.

This supports IPv6 in address DNS lookups and socket bind checks. Addresses are
looked up with the system getaddrinfo(), and the v6/v4 preference of this lookup
is respected. IPv6 address literals in the config file are expected to be
bracketed in [], and the result of lookups will be bracketed as well, to support
the ZeroMQ URI format.
Unset the IPV4ONLY socket option if available.

Since IPv6 sockets support both v4 and v6 addresses, the socket option is unset
unconditionally if the parameter is available in the zmq module. The actual
decision as to which address version to use is done by the address lookup code,
which obeys the system v4/v6 preference.
Be more resilient towards missing addresses and hostname lookup failures.
Add a unit test for passing IPv6-formatted addresses to verify_socket.
IPv6 address literals should be specified without brackets in config files.
Merge pull request #4232 from tohojo/ipv6-support

IPv6 support for master-minion communication