tests: raise an error for leaked browser processes

Change-Id: I06a75fee2f8208cff6bd68c2c9498fedcffb7087
tests: use addCleanup for WebDriver and MailCapture

This saves a bit of code in tests, and eliminates the potential for
missing tearDown methods which can leak browser processes (I spotted
a few when doing this patch).

Change-Id: Ic6cb9038e753725e45ba887640376b0857a59259