(Client._OpenSocket): support IPv6 by selecting socket family.

(_get_address_family): new function.