dns: refactor to process result in DNSResponse constructor