Fixed use of Future::get on failed Socket::connect future.

Minor bug fix after checking that a future had failed we still called
'get()' on it which causes an abort.
Added UNREACHABLE to Clock::settled to silence compiler warning.
Fix compilation error for Socket on older linux + OSX.

Test whether SOCK_NONBLOCK and SOCK_CLOEXEC are defined to use single system call to create socket.
Otherwise use os::nonblock and os::cloexec after creating the socket.

Review: https://reviews.apache.org/r/28125