Remove the hacky dump-emails-to-files mechanism.

This was used for testing before emails went via the sqlite database
and is now therefore redundant. Remove it, and update all the tests
to use new helpers which query the database.

Change-Id: Ie445096a1c8899219c0aab040d3a20e2ababe5b0