Refactor hooks related methods

Cleanup old code path and buggy behavior in the hook related methods.

This should also prevent bugs like https://github.com/flightjs/generator-flight/issues/28

Review would be good to make sure we're not introducing breaking changes. These change only affect the Base generator, so if we miss something, it won't break old generators. It could only break for the ones updating to this version.