events: fix TypeError in removeAllListeners

In the (very specific) situation in which an `EventEmitter` has a listener for the `removeListener` event, *and* `removeAllListeners()` is called using an event type that doesn't exist, `removeAllListeners()` currently throws a TypeError on `listeners.length` (as `listeners` is undefined).