events: do not accept NaN in setMaxListeners

see #6522