Support using custom sockets with libuv or libnative

This is akin to supporting custom file descriptors, but for sockets. This allows for the implementation of raw sockets in an external library, as well as integration with other libraries that use sockets such as zeromq.

It exposes a lot more of liblibc than might be desirable, but the other alternative is to add a lot of additional code which probably shouldn't be in the standard library (it quickly explodes into something monstrous like pull #11410, and that was by no means complete). This should be a minimal subset which will allow other libraries to build upon.
In general our story for extending I/O isn't so great at the moment. As you've discovered it looks like there's going to be lots of duplication between librustuv and libnative if we go down this road, which is a little unfortunate. I think this falls into the same category of where this shouldn't really exist, but it's an unfortunate necessity.