Add safeguard against plaintext leaks after close
* src/mail.cpp (Mail::close): Add saveguards against plaintext leaks.
The underlying new understanding of this fix is that
close with discard changes does not neccessarily discard
changes in the data model when the same mail is opened
First we improve by:
After our close, that the user is not asked to save changes
when the mail is opened for the third time.
Then by checking if there is still a body in the data
model we ensure that we do not allow the next write
to pass. The attachment check additionally checks
for leftover attachments.
This can create problems with PGP Partitioned mails
which we might have to improve later by checking with
gpgme_data_identify if it is actually plain text.
But this affects only the moving of mails and annoying
questions when closing outlook. So it should not be
- GnuPG-Bug-Id: T4621