Load Freemarker template from database.

Ready but depends on Erwin's R script changes so let's wait for those?
This is the cautious option where you check the filesystem first, and only load the ones you cannot find from database. If you set it as PreTemplateLoader, the database templates override the templates deployed with the app.