[DO NOT MERGE] - Attempt 2 at fixing the generator

This is a much less intrusive attempt at fixing the generator. Much closer to the original implementation and doesn't do strange postMessage usage.

This depends on https://github.com/web-animations/web-animations-js/pull/271 which we where going discard I think...