MINOR: dns: give ability to dns_init_resolvers() to close a socket when requested

The function dns_init_resolvers() is used to initialize socket used to
send DNS queries.
This patch gives the function the ability to close a socket before
re-opening it.

[wt: this needs to be backported to 1.7 for next fix]
3 files changed