fixed bugs in windows platform

Fixed bug in api_tcp_connect, when peer not reachable and timeout value
set.
Added ERROR_OPERATION_ABORTED error handling, when handle was closed.