Fix connect with timeouts
Fix connect with timeouts

Connection timeouts must be implemented by using nonblocking mode and a timer.
The logic was more or less implemented (except for that it didn't enable
non-blocking mode on the socket), and that you need to call connect again when
poll returns that the socket is writable (to get the real error from the
socket).


Distrotech/libmemcached,bigbes/libmemcached,bigbes/libmemcached,Distrotech/libmemcached,Distrotech/libmemcached,bigbes/libmemcached