Fix CustomEventEmitter

Make sure that objects passed to CustomEventEmitter's `error` event
are boiled down to real Error instances so that node's EventEmitter
does not give us this nasty "Uncaught, unspecified error" thing.
Merge pull request #1245 from saschagehlich/bugfix/customeventemitter-fix

Fix CustomEventEmitter