cleanup for events

1) util.isObject -> Array.isArray;
2) -1 loop when .emit has 3+ arguments and many handlers
3) remove unnecessary length var
4) util.isUndefined -> handler == null
This code throws since `appy` is not a function. When making changes to Node.js', one should always [run tests](http://nodejs.org/documentation/contributing/) before sending a PR to make sure that the changes don't break anything obvious.