dirmngr: Factor common libdns code out.
* dirmngr/dns-stuff.c (libdns_res_open): New. Replace all libdns_init and dns-res_open by a call to this func. (libdns_res_submit): New wrapper. Replace all dns_res_sumbit calls. (libdns_res_wait): New function. (resolve_name_libdns): Replace loop by libdns_res_wait. (get_dns_cert_libdns): Ditto. (getsrv_libdns): Ditto.
- Signed-off-by: Werner Koch <wk@gnupg.org>