Fix a crash in evdns related to shutting down evdns

Patch from YASUOKA Masahiko; fix for libevent github issue #113.
Merge remote-tracking branch 'origin/patches-2.0'