Hoist function declarations in generator functions

This is so that we do not add a function where it isn't allowed
in ES5 strict mode, due to the CPS transformer.

Fixes #1172
Perhaps we do not have a test case that hoists functions because the `push()` of the function on a boolean should have failed.