stream: use FL, not FD.
client: support connectiontimeoutms with poll() for POLLOUT on socket.

We need to put the socket in O_NONBLOCK mode and then connect() will
return -1 and errno set to EINPROGRESS. Under this condition, we can
poll() for POLLOUT (writability) to check for success or failure.

Success and failure are determined by getsockopt() for
SOL_SOCKET with SO_ERROR non-zero value.
TODO: remove connecttimeoutms.