tcp: improve multi-threaded support

Do not progress conn sends in cci_connect()
If blocking send, detect connection closing and return error
If POLLHUP && POLLOUT && no socket error, try ust POLLOUT
If POLLHUP && conn status is ACTIVE2, the event may still be queued
Take conn slock before changing status to READY
Exit loop when found > nfds, not count