build: fix dragonflybsd autotools build

Fixes multiple definition linker errors due to what seems to be multiple
inclusions of src/unix/freebsd.c and src/unix/kqueue.c.

Fixes #72, refs joyent/libuv#1576.

PR-URL: https://github.com/libuv/libuv/issues/72
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
build: link against -pthread

Please see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773341 for
more information.  Libuv uses some of pthread's symbols, but it doesn't
link against it, which causes underlinking issues, especially in Ubuntu
where we use ld --as-needed.  The issue also shows up as warnings in
Debian's build logs.

PR-URL: https://github.com/libuv/libuv/pull/73
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
win: scandir use 'ls' for formatting long strings

PR-URL: https://github.com/libuv/libuv/pull/75/files
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Merge branch 'v0.10' into v1.x

Conflicts:
	config-unix.mk
build: remove clang and gcc_version gyp defines

The clang and gcc_version defines were used to:

1. Conditionally enable -fvisibility=hidden, a switch introduced in
   gcc 4.0.  Because 4.2 is the minimum supported version, we can
   make it unconditional.  People that want to build with older
   versions, can use '-Dvisibility='.

2. To conditionally enable -Wno-dollar-in-identifier-extension,
   an Apple extension that suppressed warnings about sigils in
   dtrace probe names.  Dtrace probes were removed in cb514002.

PR-URL: https://github.com/libuv/libuv/pull/76
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
unix, windows: don't treat uv_run_mode as a bitmask

The modes are not meant to be combined, and doing so may hide problems
in the future.
unix, windows: fix UV_RUN_ONCE mode if progress was made

If pending I/O callbacks were ran before polling, do a zero timeout
poll.