Switch from select() to poll() for client code.

FD_* macros have a limit of FD_SETSIZE file descriptor value that they
can handle, so select() is not ideal when we have too many connections
cached and the socket descriptors surpass that number (1024 in
glibc). This caused subtle stack corruption in heavily loaded
environment.