Support phpunit 4.x and fix email capturing

- Implement required interface for PHPUnit 4.x TestListener
- Use test prefix rather than annotation for tests
- Catch email by default during testcases
- Add an extra mail model to catch emails being sent out during tests that do not use the mail template model.
- Add tests for email capture functionality