The current select() is limiting in instances where the fd num is > FD_SETSIZE.
Since redisContextWaitReady() only processes a single fd, select would still
fail.
For compatibility reasons I have converted select() over to poll(), eliminating
this problem.
If getaddrinfo(3) includes an AF_INET6 address before an AF_INET
address on a host with only IPv4 network connectivity then the
redisContextConnectTcp call would fail with "no route to host".
This commit fixes this issue by specifically handling the errno
EHOSTUNREACH error and entering another iteration of the addrinfo
loop. This will allow following AF_INET addresses to be attempted.
Change redisContextConnectTcp() function to use getaddrinfo(3) to
perform address resolution, socket creation and connection. Resolved
addresses are limited to those reachable by the AF_INET family.