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. 
Ok soo, this method is HUGE. Move this into it's own `describe()` block and setup the error listeners inside `beforeEach`/`afterEach` methods. The way it is done now is pretty brittle as bug could be easily introduced due to the global complexity. Also I'm pretty sure the logic doesn't restore the listeners correctly, so using a teardown cleanup will ensure this is done correctly no matter what happen inside the code.

Also just manually make sure failing assertions are not swallowed by the error handling code you added here.