unix: correct error when calling uv_shutdown twice

This is a backport of a284b90 for v0.10 branch
fs: vectored IO API for filesystem read/write

This improves API consistency with uv_read and uv_write and may
improve efficiency for some uses. Vectored IO is emulated when the
requisite system calls are unavailable.
build, windows: fixed x64 configuration issue
windows: fixed compilation warning
build: update dtrace m4 check for sunos

The check to see if -G is needed for dtrace requires a bit more effort,
make a header, c file, and object file.
Revert "fs: vectored IO API for filesystem read/write"

This reverts commit 7df24583e5ea77086e765a4bf0773407f0ec190d.
windows: freeze in uv_tcp_endgame

The event_handle field of unused accept requests was not being
initialized properly. As a result, uv_tcp_endgame would try to close
an invalid handle and this could lead to unexpected behavior.

This fixes node.js test test-cluster-disconnect.js on Windows.
Merge branch 'v0.10'

Conflicts:
	build.mk
	test/test-shutdown-twice.c
sunos: handle rearm errors

fix #1078
Merge branch 'v0.10'

Conflicts:
	src/unix/sunos.c
unix: use a heap for timers

Replace the red-black tree with a heap.  The most common operation that
libuv performs on timers is looking up the first timer to expire.  With
a red-black tree, that operation is O(log n).  With a heap, it's O(1).
linux: always deregister closing fds from epoll

If the same file description is open in two different processes, then
closing the file descriptor is not sufficient to deregister it from the
epoll instance (as described in epoll(7)), resulting in spurious events
that cause the event loop to spin repeatedly. So always explicitly
deregister it.

Fixes #1099.
test: fix VC++ warning C4244
linux: include grp.h for setgroups()
unix, windows: add uv_loop_init and uv_loop_close

These functions supersede uv_loop_new and uv_loop_delete.
uv_loop_init initialized a user allocated loop and uv_loop_close
removes all associated resources a loop uses after it has finished
execution.

uv_loop_new and uv_loop_delete are now deprecated.
unix, windows: add uv_getrusage() function
test: fix spawn_stdout_and_stderr_to_file test

S_IREAD and S_IWRITE are obsolete in GNU libs and
not included in the Android NDK's libc. See
http://www.gnu.org/savannah-checkouts/gnu/libc
/manual/html_node/Permission-Bits.html
build: update android toolchain

gcc-4.7 has been removed in revision r9c. More info:
http://developer.android.com/tools/sdk/ndk/index.html#Revisions
win: minor error handle fix to uv_pipe_write_impl

This commit ensures a proper win32 error code is returned
from uv_pipe_write_impl in case of failure.