honor the timeout provided as argument
ensure applying the timeout when making a new connection

connect() doesn't honor the SO_SNDTIMEO/SO_RCVTIMEO options so
we need to use select to actually apply a timeout to the connect() call which is
smaller than the system-wide configured one
proper connection-caching implementation

so that available connections to a specific node can be reused
among different threads.
(instead of creating one connection per node per thread, which might
result in hundreds of filedesciptors allocated only for the inter-node communication)