events: ensure usingDomain is always boolean

Small addition to ensure that exports.usingDomains is always a bool.
events: type check setMaxListeners, cleanup errors

setMaxListeners will now make sure a positive number is passed. Also
throwing more definitive Error types.