Move template config into a separate module

This configuration is duplicated between the hosting and instance apps,
so it makes sense to move it all into one place.