Properly support socketpair and reading and writing non-blocking sockets
Summary:
Also handle invalid file descriptors correctly and switch away from `WSASendMsg` for the implementation of `sendmsg` due to limitations imposed by WinSock.
This also fixes up a few places that were explicitly referencing the global version of some socket functions, which was bypassing the socket portability layer.
Reviewed By: yfeldblum
Differential Revision:
D3692358
fbshipit-source-id:
05f394dcc9bac0591df7581345071ba2501b7695