events: type check setMaxListeners, n must be a positive integer

You may check this issue before: https://github.com/joyent/node/commit/dd171d24df4fd6361e7db11dc7b6fd15e68934ab

`setMaxListeners` will now make sure a positive `integer` is passed and reduce a logic operator. Also
throwing more definitive Error types.