Add safe_getaddrinfo
Use designated initializer
Support IPv4/IPv6 dual stack