Rename object Generator->GeneratorFactory.
Factor out TemplateGenerator.
Pass in template caches into generators.