darwin: fix ios build error

Include <errno.h> and <stdlib.h>.  They're being pulled in implicitly
on OS X but apparently that's not the case with iOS builds.

Build breakage introduced in 5ff6f85 by yours truly. Mea culpa.

Fixes #885 and #891.
darwin: fix ios compiler warning

uv__fsevents_loop_delete() returns void. Remove the 'return 0'
statement.
test: simplify test-ip6-addr.c

Drop the callback-driven approach in favor of a simple loop. Reduces
the line count and makes the flow of execution a little easier to
follow.
unix, windows: fix ipv6 link-local address parsing

uv_ip6_addr() copies the address part to a temporary buffer when it
contains a link-local suffix ('<address>%<interface>'). Before this
commit, it didn't zero-terminate the address properly: it put the nul
byte at the end of the temporary buffer rather than at the end of the
address string, meaning the buffer looked like this:

    <address> <garbage> '\0'

Fixes the following valgrind warning:

    ==16170== Conditional jump or move depends on uninitialised value(s)
    ==16170==    at 0x43602C: inet_pton6 (inet.c:228)
    ==16170==    by 0x435CE1: uv_inet_pton (inet.c:163)
    ==16170==    by 0x436FD0: uv_ip6_addr (uv-common.c:175)
    ==16170==    by 0x434717: test_ip6_addr_scope (test-ip6-addr.c:89)
    ==16170==    by 0x43455B: call_iface_info_cb (test-ip6-addr.c:45)
    ==16170==    by 0x43462B: foreach_ip6_interface (test-ip6-addr.c:59)
    ==16170==    by 0x434791: run_test_ip6_addr_link_local (test-ip6-add
    ==16170==    by 0x4061E8: run_test_part (runner.c:396)
    ==16170==    by 0x404F4B: main (run-tests.c:58)
    ==16170==
    ==16170== Conditional jump or move depends on uninitialised value(s)
    ==16170==    at 0x4C2AD8A: __GI_strchr (mc_replace_strmem.c:224)
    ==16170==    by 0x435ECB: inet_pton6 (inet.c:231)
    ==16170==    by 0x435CE1: uv_inet_pton (inet.c:163)
    ==16170==    by 0x436FD0: uv_ip6_addr (uv-common.c:175)
    ==16170==    by 0x434717: test_ip6_addr_scope (test-ip6-addr.c:89)
    ==16170==    by 0x43455B: call_iface_info_cb (test-ip6-addr.c:45)
    ==16170==    by 0x43462B: foreach_ip6_interface (test-ip6-addr.c:59)
    ==16170==    by 0x434791: run_test_ip6_addr_link_local (test-ip6-add
    ==16170==    by 0x4061E8: run_test_part (runner.c:396)
    ==16170==    by 0x404F4B: main (run-tests.c:58)

Fixes #890.
fsevents: FSEvents is most likely not thread-safe

Perform all operation with FSEventStream in the same thread, where it'll
be used.
windows: omit stdint.h, fix msvc 2008 build error

Don't include <stdint.h>, it's not available when compiling with MSVC
2008 and we don't need it in the first place - just cast the argument
to `char *` rather than `uintptr_t`.

Fixes #893.