Implement new Generator.extend inheritance method

I'll add some missing test, but this is my WIP.