Global processing of strings as templates

This is attempt 2 of #231. This switches gears from the previous pull request and puts the onus of doing the template handling on the plugin developers. The benefit is that this VASTLY simplifies the template processing code, to a point I think this is worth it.