(v6.x backport) events: do not keep arrays with a single listener
Backport of https://github.com/nodejs/node/pull/12043. I've also added https://github.com/nodejs/node/pull/12501 on top as suggested in https://github.com/nodejs/node/pull/12043#issuecomment-309289115.
Affected core subsystem(s)
events