src: close libuv handles on exit

Commit 556b890 added a call to uv_loop_delete() with the intent of
catching handle lifecycle bugs.  It worked because it exposed one:

    process.on('exit', function() {
      console.log('bye');  // Asserts.
    });

When run, it asserts with the following message:

    Assertion failed: (!uv__has_active_reqs(loop)), function
    uv__loop_delete, file ../deps/uv/src/unix/loop.c, line 150.

That's because libuv as of joyent/libuv@3f2d4d5 checks that there are
no in-flight requests when the event loop is destroyed.  In the test
case above, the write request for the string hasn't completed yet by
the time node.js exits: the string itself has most likely been written
but libuv hasn't had the opportunity to return the write request to
node.js.

That's why this commit adds a cleanup step right before exit where it
explicitly closes all open handles, then waits until the event loop
exits naturally.

Named pipes (UNIX domain sockets) are shut down first in order to flush
pending write requests.  Should go some way towards fixing the Windows
issue where output on stdout/stderr sometimes gets truncated.

Fixes joyent/libuv#911.
test: move smalloc segfault tests to pummel

These tests take a while to complete, and the issue only potentially
appears under heavy load.
Revert "src: close libuv handles on exit"

This change is not entirely ready for prime time: it's making ~50 tests
fail on Windows, mostly due to timeouts.  It's up for debate who is
at fault here: node.js or libuv.

It does however expose a libuv bug on OS X, where the event loop
sometimes gets stuck in uv__io_poll() when there is a single
UV_SHUTDOWN request left in the queue.  Needs further investigation.

This reverts commit 4915884da69814bd4daab22393919a628c9ecf23.
Revert "src: call uv_loop_delete() on exit in debug mode"

Don't call uv_loop_delete() until we've figured out a way to gracefully
close open handles.  See also commit 4915884 and its subsequent revert
in commit 980cbd5.

This reverts commit 556b890ad91780c52c77dccaddcf69beb8184e27.
benchmark: Support passing v8 flags to benchmarks

The better to test --use-strict effects on performance.

(Spoiler: it has no measurable effect on performance.)
Merge remote-tracking branch 'ry/v0.10'
benchmark: Fix execArgv handling

Bug in 01f3b46 causes the same benchmark to be run repeatedly.

Not so useful for the compare scripts.
Merge remote-tracking branch 'ry/v0.10'
test: speed up simple/test-fs-watch

Don't wait a full second before starting the watcher, 10 ms ought to be
more than enough time.  Reduces running time from 1250 ms to 250 ms on
my system.
test: don't use --max-stack-size=0

--max-stack-size was removed in 3a87b31, use --stack-size instead.
What's more, a zero length stack will likely crash the process.
src: clean up CLI argument parser

* Exit with an error message when the option is not a node or V8 option.

* Remove the option_end_index global.  Needs to happen anyway for
  the multi-context work, might as well land it in master now.

* Add a smidgen of const-correctness.

* Pay off a few years of accrued technical debt.
multi-context wip
multi-context startup wip
multi-context security token wip
process: Add internal _rawDebug() method

This is useful when we need to push some debugging messages out to
stderr, without going through the Writable class, or triggering any kind
of nextTick or callback behavior.

Conflicts:
	src/node.cc
node: move tick callback lazy load code block

It's possible to require('domain') within a MakeCallback, which means
the env->tick_function_callback() will change. So moving the lazy load
block to just before the call of the function will allow
SetupDomainCallback to override the method before it's used.
node: don't share state with in_tick/last_threw

There was no need to share state between C++ and JS for these two
values. So they have been moved to their respective locations. This will
help performance only a tiny bit, but it does help code complexity much
more.
test: add asyncListener tests

These tests should cover all basic uses of the asyncListener API.
node: add basic asyncListener skeleton

The implementation necessary before other parts of Node can start
calling the asyncListener.
src: add preliminary support for asyncListener

AsyncListener support has been added to ReqWrap, Timers, Events and
nextTick. The listeners will not yet propagate with asynchronous
callbacks called within other callbacks.