Start attachment handling based on OOM
* src/cryptocontroller.cpp (CryptController::collect_data): Change to work in OOM and not on MAPI. (Mail::checkSyncCrypto_o): Enable async for attachments again. * src/mailitem-events.cpp (SEND): Don't save before encrypting. * src/mimemaker.cpp (write_attachment_fallback): New. Data obj based helper as fallback for inline attachments. (write_attachment): Write attachments to tmp file to get them serialized properly. This helps for Outlook .msg attachments. (write_attachments): Rewrite to work with OOM data. (add_body_and_attachments): Use new functions.
This is the start to rewrite the way we handle attachments
when creating a crypto mail. This is intended to further
prevent unencrypted data written into MAPI and then depending
on the MAPI backend synced to the server. It also better
follows our modern pattern to do as much as possible with
OOM rather then with MAPI.