Merge remote-tracking branch 'origin/v0.10'

Conflicts:
	lib/buffer.js
	lib/http.js
	src/node.cc
doc: remove mention of maxTickDepth

maxTickDepth has been removed, but mention of it was left in the docs.
Also added explanation that nextTick is allowed to starve I/O.
smalloc: fix style, use macro
buffer: use macro
smalloc: revert change to use pointer indirection

Better to compare fixed addresses than to use pointer indirection.
v8: upgrade to v3.20.2
v8: reapply floating patches
build: remove --unsafe-optimizations flag

The previous commit removes our patch that builds V8 at -O2 rather
than -O3 so there is not much point in keeping the configure switch
around.

The reason it did so was to work around an assortment of compiler and
linker bugs. In particular, certain combinations of g++ and binutils
generate bad or no code when -ffunction-sections or -finline-functions
is enabled (which -O3 implicitly does.)

It was quite the problem back in the day because everyone and his dog
built from source. Now that we have prebuilt binaries and packages
available, there is no longer a pressing need to be so accommodating.

If you experience spurious (or possibly not so spurious) segmentation
faults after this commit, you need to upgrade your compiler/linker
toolchain.
lib, src: upgrade after v8 api change

This is a big commit that touches just about every file in the src/
directory. The V8 API has changed in significant ways. The most
important changes are:

* Binding functions take a const v8::FunctionCallbackInfo<T>& argument
  rather than a const v8::Arguments& argument.

* Binding functions return void rather than v8::Handle<v8::Value>. The
  return value is returned with the args.GetReturnValue().Set() family
  of functions.

* v8::Persistent<T> no longer derives from v8::Handle<T> and no longer
  allows you to directly dereference the object that the persistent
  handle points to. This means that the common pattern of caching
  oft-used JS values in a persistent handle no longer quite works,
  you first need to reconstruct a v8::Local<T> from the persistent
  handle with the Local<T>::New(isolate, persistent) factory method.

A handful of (internal) convenience classes and functions have been
added to make dealing with the new API a little easier.

The most visible one is node::Cached<T>, which wraps a v8::Persistent<T>
with some template sugar. It can hold arbitrary types but so far it's
exclusively used for v8::Strings (which was by far the most commonly
cached handle type.)
string_bytes: stop using String::AsciiValue

Debug builds of V8 now actively check that the string only contains
ASCII characters (i.e. doesn't contain bytes with the high bit set.)
src: abort() on fatal error in debug mode

abort() generates a nice core dump and makes it easy to catch fatal
errors in one's debugger of choice.
src: enable native v8 typed arrays

This commit removes our homegrown typed arrays implementation and
enables V8's built-in typed arrays implementation.
tools: add check-imports.sh script

Checks that `using` statements in src/*.cc are properly sorted and
actually used.
test: fix up weakref.cc after v8 api change
build: don't enable --gc-sections on sunos

The SunOS linker doesn't support it. Fixes build breakage introduced
in commit 9b3de60.
timers: internal unref timers should use Timer.now
http: use an unref'd timer to fix delay in exit

There was previously up to a second exit delay when exiting node
right after an http request/response, due to the utcDate() function
doing a setTimeout to update the cached date/time.

Fixing this should increase the performance of our http tests.
deps: upgrade c-ares to piscisaureus/cares@805d153

This should fix the Android build.
smalloc: zero size allocs may need to be free'd

Zero size allocations don't necessarily mean that data == NULL. So
instead check each value seperately and perform necessary operations.
smalloc: call callback if set on AllocDispose

Fix bug where if dev passed a callback to Alloc then called AllocDispose
it wouldn't bother to pass the data to the callback and instead would
just free it.