Fix null pointer derefence when statsd server is unreachable (fixes #2)

See this: http://trac.nginx.org/nginx/ticket/300

Fixes #2

**TL;DR ngx_resolver was causing child process segfaults due to null pointer derefence operations. This has been fixed in February 2012. Since nginx-stats contains some code that looks quite similar to ngx_resolver we should port their patch - and that's what this pull request does :)**