so that cleanup can all be done in dns_client_destroy(). (cherry picked from commit e80c4c3431)
e80c4c3431