test/net/dns.cpp: skip some tests if the network is down

I decided to base the check on whether the network is down on
evdns code, 8.8.4.4 and the availability of "github.com".

This seems to me OK; evdns is widely used, 8.8.4.4 should be
available in 99.999% of the cases; if "github.com" is not a
domain anymore, well, we have problems.

Tested on Xubuntu, MacOSX with both network enabled and
disabled, to cover both cases.

Patch prodded by @hellais comments on my pull request.