make dns lookups (and thus getaddrinfo) cancellable