Reduce syncs by canceling writes
* src/mail.cpp (is_smime, needs_save): New. * src/mail.h: Declare and add new properties. * src/mailitem-events.cpp (MailitemEvents::Invoke): Cancel most writes. * src/revert.cpp (mailitem_revert): Use is_smime.
There are nearly no cases where we want to accept a write
event for one of our crypto mails. If we cancel the write
our changes won't be synced to the server.
When closing a message we have to save / revert to avoid
the "Properties of the message have changed" dialog which
is totally confusing to users.
We also want to write / revert in case S/MIME is disabled
and we've encountered an S/MIME mail that was changed
by us.