Switch to a small DNS library for DNS resolving.

Hi,

I've externalized the dns code (hey @Flowdalic ) and I'm now trying both methods (reflection and exec, in that order).

I hope this fits better.