Support global templates
Add support for specifying a single template for all output generation regardless of which tree is used. Rely on that template to figure out how to generate output for the particular specified tree. Make the template optional, resulting in always-empty output.
Keep support for per-tree templates until kpet-db is transitioned to the global template, to be removed afterwards.