Improve UNIX implementation of uv_guess_handle.

uv_guess_handle is currently squelching both fifo and all
sockets on to the UV_NAMED_PIPE type. Rather than treating
all sockets as UV_NAMED_PIPE, use getsockopt() and
getsockaddr() to determine if the socket is an AF_UNIX
stream (in which case return UV_NAMED_PIPE), or an AF_INET
stream (in which case return UV_TCP), or an AF_INET datagram
socket (in which case return UV_UDP).

Additionally, currently all other file descriptor types are
squelched to the UV_FILE type. Instead, only file descriptors
that are marked as regular files are treated as UV_FILE. All
other types (such as directories, character and block devices)
are now treated as UV_UNKNOWN_HANDLE.
Add tests for uv_guess_handle.

This adds relatively comprehensive tests for UNIX platforms,
however the Windows testing is currently light-on. Someone
with strong windows experience may be able to improve this.

The current #ifdef conditional compilation approach is probably
not ideal. It may be simpler to have a seperate test function
for windows and UNIX than the current approach.