AbstractTemplateGenerator refactored for QueryJ and TemplatePackaging uses. refs #418