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
I would not modify any of the `arguments`' elements. Changing them has side effects (like changing named parameters, since they reference the same data) that would lead to a lot of confusion.