Use a more reliable method to generate resolver errors.

On some platforms even getaddrinfo is fooled by the fake NXDOMAIN results.
Disallow ipv6 in curl-based tests.

The test servers only listen on ipv4, and it appears that libcurl 7.19.34
has regressed in its ability to handle the case when localhost resolves
to both v4 and v6 variants but only one works.

IPv6 was already disabled by default in simple_httpclient tests.