Move parse_name() to dns.h so it can be tested
Summary:
parse_name() is one of two functions are critical to all other dns functions
and should be tested. It must be moved to dns.h in order to avoid including
dns.cpp.
Test Plan:
make check
Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc
Reviewed By: deadalnix, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D4275