events: setMaxListeners must be a positive integer

You may check this issue before: dd171d2
setMaxListeners will now make sure a positive integer is passed and reduce a logic operator. Also
throwing more definitive Error types.