test: open stdout fd in write-only mode

Fixes #771.
windows: uv_spawn shouldn't reject reparse points

This fixes an issue where uv_spawn would not try to run a reparse point,
and continue to scan the PATH instead. Effectively, it was impossible to
spawn a symlinked binary. This commit fixes that.

Also see #748
windows: use WSAGetLastError(), not errno

setsockopt() doesn't touch errno on failure. Use WSAGetLastError()
instead.

This is a back-port of commit 30a8b44 from the master branch.
build: darwin: disable -fstrict-aliasing warnings

gcc 4.2.1 as shipped with Xcode complains incessantly about aliasing
warnings, which, while technically true, disregards the fact that the
aliased types have the same layout in memory. Squelch the warnings.
test: fix signed/unsigned compiler warning
test: add 'start timer from check handle' test

Check that a timer that is started from a check handle gets picked up
correctly, i.e. that it influences the timeout used in the next tick
of the event loop.
build fix wip