memoize template_report and handle emailed reports
Merge pull request #510 from dimagi/emailable-report-template

memoize template_report and handle emailed reports