Extract template compilation from `loadTemplate()` to `createTemplate()`

This provides a hook for customizing how templates are compiled, allowing for pre- and post- processing of templates compiled by the Handlebars compiler.

Fixes #39