dns: move getaddrinfo and getnameinfo to a 'dns' submodule