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

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 

### Todos

- [x] Make code changes
- [ ] Update README docs
- [ ] Add HISTORY entry
- [ ] Test in real-world apps