Fix Error handling for generator

A generator raising an exception will now correctly emit an `error` event.
This can be used in unit test as the error event is now binded between the generator and its run context. 
Add a comment then so people going through it will understand. Also  `// Handling error for process.domain` is not an informative comment, I'd remove them.