Add nonblocking connect support
Make sure date math is done in 64-bit prec

Some platforms declare tv.tv_sec and tv.tv_usec as long which is 32-bit
which will integer overflow in our date math