Added support for loading template data resolvers from plugins

The TemplateRenderer now loads all data resolvers that are present in
the tree during its BEGIN step, instead of explicitly loading all core
resolvers.
Improved temporary file detection
Moved template validation to after the buildConstruct trigger

This lets trigger scripts generate changed versions of templates
and have those validated instead of the source files (and can avoid
errornious "duplicate template" errors when a template is copied,
altered and then the original removed in buildConstruct (ie. to add
version numbers to strings etc.)).