events: add check for listeners length

Ability to return just the length of listeners for a given type, using
_listenerLength(). This will be a lot cheaper than creating a copy of
the listeners array just to check it's length.
events: ensure usingDomain is always boolean

Small addition to ensure that exports.usingDomains is always a bool.
events: type check setMaxListeners, cleanup throws

setMaxListeners will now make sure a positive number is passed. Also
throwing more definitive Error types.
events: simplify removeAllListeners logic

Unnecessary checks were being performed on if the event existed before
being removed.

_events starts out as null, so reset to null when emptied.

Checking typeof is a lot cheaper than isArray().
events: type check listeners

Make sure the argument passed is a string. Also use typeof == function
check instead of isArray().
events: removeListener add checks and cleanup

Remove unecessary splice for single listener events. Add type check for
"type" argument.
events: _events to object and undefined not null

By making sure the _events is always an object there is one less check
that needs to be performed by emit.

Use undefined instead of null. typeof checks are a lot faster than
isArray.

There are a few places where the this._events check cannot be removed
because it is possible for the user to call those methods after using
utils.extend to create their own EventEmitter, but before it has
actually been instantiated.
events: additional type check for addListener

Check both passed args to addListener.

Place var at beginning.

Switch warned to _warned. Seemed inconsistent to have some internal
properties start with _ and others not.
events: emit cleanup

Cleanup check logic. Place vars at top. Remove PROCESS.

This commit is to make the next couple commits a lot easier to
implement.