linux: use /proc/cpuinfo for CPU frequency

Obtain the CPU frequency from /proc/cpuinfo because there may not be any
cpufreq info available in /sys. This also means that the reported CPU speed
from now on is the *maximum* speed, not the *actual* speed the CPU runs at.

This change only applies to x86 because ARM and MIPS don't report that
information in /proc/cpuinfo.

Fixes #588.

This is a back-port of commit 775064a from the master branch.
sunos: fix uv_getaddrinfo() NULL pointer dereference
windows: add some error code mappings
windows: improve / fix uv_interface_addresses

* If GetAdaptersAddresses() failed, it would return UV_OK nonetheless,
  but the `adresses` and `count` out parameters would not be set.

* When adapters were enabled or added in between the two
  GetAdaptersAddresses() calls, it would fail.

* In case of an out of memory situation, libuv would crash with a fatal
  error.

* All interface information is now stored in a single heap-allocated
  area.
sunos: properly disarm PORT_LOADED fsevent watcher

Fixes a segmentation fault when the watched entity is changed after the watcher
has been closed.
windows: map ERROR_DIRECTORY to UV_ENOENT
win: sort error code mappings
win: add error mappings related to unsupported protocols
win: fix uv_winsock_init crash when no IPv4 stack present

uv_winsock_init() tries to create an IPv4 socket in order to detect
if the system has any layered service providers (LSPs) installed.
When creating this socket failed it would call uv_fatal_error and exit
with the following message:

  socket: (10047) An address incompatible with the requested protocol was used.

This patch fixes that. It also includes some minor style tweaks.
win/tcp: make uv_tcp_set_socket set UV_HANDLE_IPV6

This makes uv_tcp_set_socket responsible for setting the UV_HANDLE_IPV6
flag. This fixes a couple of situations where the the fact that a socket
is an IPv6 socket is not taken into account when deciding whether a call
to SetFileCompletionNotificationModes is appropriate.
win/udp: make uv_udp_set_socket set UV_HANDLE_IPV6

This patch makes uv_udp_set_socket responsible for setting the
UV_HANDLE_IPV6 flag.

In addition, this patch fixes some minor style issues.
win/udp: fix bug in getsockopt() return value check
win: get rid of early ipv6 support detection

No longer explictly check wheter an IPv6 stack is present when the user
tries to use IPV6 sockets. Instead realy on the operating system
to report the lack of protocol support via appropriate error messages.
Merged with upstream