config: Remove deprecated net functions
gethostbyname and inet_ntoa are deprecated and shouldn't be used. Also
gethostbyname is unable to handle ipv6.
Replace gethostbyname by getaddrinfo.
inet_ntoa is replaced by inet_ntop.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>