Fix hiredis getaddrinfo leak

Fixed in Redis by 1a5e5b6, but since that part of the hiredis code is largely copy/paste'd from Redis, the fix needs to be ported over too.

Fix confirmed in #2012