fix some memory issues

* getaddrinfo is alread allocating the addrinfo struct so we get a
  (quiet small) memory hole
* now checking if malloc failed for whatever reason
* free allocated memory in case of an error (otherwise we 'could'
  take all available memory when having a connect failure on each
  statsd call)
* TODO if I startup a varnish and put all traffic at once on it the
  freeaddrinfo is failing (in libjemalloc/jemalloc_linux.c) and I
  don't know why. Probably this is a bug in the libjemalloc but I'm
  not sure about that, maybe it is a problem with multithreading (many
  of them tries to connect but a fprintf() debugging doesn't show
  something like that)..