Core hq email custom reports

originally https://github.com/dimagi/core-hq/pull/964