Merge changes from PGP/MIME repository

I feel this is a reasonably stable state of the [PGP/MIME repository](https://github.com/k9mail/k9mail_pgp_mime) that should be merged into master.

This also adds Espresso tests that are unrelated to PGP/MIME.