domains: properly check if domains are being used

process.domain is almost never just undefined, so it was setting the
object property unnecessarily.
Merge branch 'v0.11.5-release'
Now working on 0.11.6
blog: Post for v0.11.5
src: add IsEmpty() check to HasInstance()

The check has virtually zero overhead and it simplifies the call sites
because they were calling IsEmpty() anwyay.
src: constify WITH_GENERIC_STREAM macro

Make the pointer-to-wrap const (i.e. mutable but not assignable) to
prevent accidental reassignment in the macro body.
stream_wrap: use getters, not direct field access

Hide member fields behind getters. Make the fields themselves const
in the sense that the pointer is non-assignable - the pointed to object
remains mutable.

Makes reasoning about lifecycle and mutability a little easier.
stream_wrap: add handle type checkers

Add is_named_pipe(), is_named_pipe_ipc() and is_tcp() and update the
code base to use those rather than `stream->type == UV_FOO` and
`reinterpret_cast<uv_pipe_t*>(handle)->ipc` style checks.
src: remove no-op HandleWrap::Initialize()

It's never been used and we probably never will. Remove it.
http: Support legacy agent.addRequest API

There are some agent subclasses using this today.

Despite the addRequest function being undocumented internal API, it's
easy enough to just support the old signature for backwards
compatibility.
stream_wrap: fix long line introduced in da5ad92

Said commit was a back-port from a feature branch where it did lint.
Mea culpa.
smalloc: cleanup checks/conversions

* Moved the ToObject check out of smalloc::Alloc and into JS. Direct
  usage of that method is for internal use only and so can bypass the
  possible coercion.
* Same has been done with smalloc::SliceOnto.
* smalloc::CopyOnto will now throw if passed argument is not an object.
* Remove extra TargetFreeCallback function. There was a use for it when
  it was working with a Local<T>, but that code has been removed making
  the function superfluous.
smalloc: allow different external array types

smalloc.alloc now accepts an optional third argument which allows
specifying the type of array that should be allocated. All available
types are now located on smalloc.Types.
http: Use streams3 directly, not .ondata/end
stream: Short-circuit buffer pushes when flowing

When a stream is flowing, and not in the middle of a sync read, and
the read buffer currently has a length of 0, we can just emit a 'data'
event rather than push it onto the array, emit 'readable', and then
automatically call read().

As it happens, this is quite a frequent occurrence!  Making this change
brings the HTTP benchmarks back into a good place after the removal of
the .ondata/.onend socket kludge methods.
src: use v8::String::NewFrom*() functions

* Change calls to String::New() and String::NewSymbol() to their
  respective one-byte, two-byte and UTF-8 counterparts.

* Add a FIXED_ONE_BYTE_STRING macro that takes a string literal and
  turns it into a v8::Local<v8::String>.

* Add helper functions that make v8::String::NewFromOneByte() easier to
  work with. Said function expects a `const uint8_t*` but almost every
  call site deals with `const char*` or `const unsigned char*`. Helps
  us avoid doing reinterpret_casts all over the place.

* Code that handles file system paths keeps using UTF-8 for backwards
  compatibility reasons. At least now the use of UTF-8 is explicit.

* Remove v8::String::NewSymbol() entirely. Almost all call sites were
  effectively minor de-optimizations. If you create a string only once,
  there is no point in making it a symbol. If you are create the same
  string repeatedly, it should probably be cached in a persistent
  handle.
dgram: fix regression in string argument handling

v0.10 allows strings for the offset, length and port arguments to
dgram.send() and dgram.sendto() but master before this commit would
abort with the following assert:

    node: ../../src/udp_wrap.cc:227: static void
    node::UDPWrap::DoSend(const v8::FunctionCallbackInfo<v8::Value>&,
    int): Assertion `args[2]->IsUint32()' failed.

Go beyond what v0.10 does and also add range checks: offset and length
should be >= 0, port should be between 1 and 65535.

That particular change needs to be back-ported to v0.10 because passing
a negative offset or length number aborts with the following assertions:

    node: ../../src/udp_wrap.cc:264: static v8::Handle<v8::Value>
    node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
    `offset < Buffer::Length(buffer_obj)' failed.

Or:

    node: ../../src/udp_wrap.cc:265: static v8::Handle<v8::Value>
    node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
    `length <= Buffer::Length(buffer_obj) - offset' failed.

Interestingly enough, a negative port number is accepted in v0.10 but
is silently ignored.

This commit exposed a bug in the simple/test-dgram-close test which
has also been fixed.
dgram: don't call into js when send cb is omitted

Speed up dgram.Socket#send()-heavy code a little by omitting the call
into JS land when the user doesn't pass us a completion callback.
src: fix windows build breakage from f674b09

The TWO_BYTE_BUFFER macro never made it into the final version of
the patch that got landed in commit f674b09.
test: use common.PORT in simple/test-net-GH-5504