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.