Precompile templates to modules

One may want to store templates in modules, instead of a global variable. This allows Node to use templates precompiled to CJS. But a new loader will be required.

For now, the templates are exported as default, but it may be expanded to named exports in the future, to allow to store many templates in one module.