Refactor test/net/dns.cpp to separate unit and regress tests

Clarity++.