Convert mail and email_template module test cases in new api.

- Task: https://www.odoo.com/web#id=10567&view_type=form&model=project.task&action=333&active_id=131
- Pad: https://pad.odoo.com/p/r.E3fIXr3BOvfGJYCr
Are you sure you need to clean the cache? By the way, this method has been renamed `invalidate_cache` in new API