Support HTML sending and fix sender updates
* src/mail.cpp (Mail::Mail): Update init. (Mail::get_sender): Sender is now a string. (Mail::encrypt_sign): Update accordingly. (Mail::update_sender): Changed to update_oom_data. (Mail::update_oom_data): More generic. Caches BodyFormat, HTMLBody and sender. Changed order for sender retrieval when composing mails. (Mail::update_sigstate): Update accordingly. (Mail::is_html_alternative, Mail::get_cached_html_body): New. * src/mail.h: Update accordingly. * src/mailitem-events.cpp (EVENT_SINK_INVOKE): Update oom data on send. * src/mimemaker.cpp (create_mapi_attachment): Fix another use after free. (infer_content_type): is_mapibody now defines text/html or text/plain. The naive content deduction is removed. (add_body): Handler for the HTML / multipart body. (do_mime_sign, mime_encrypt): Use add_body. (mime_sign, mime_sign_encrypt): Pass on mail object.
We now send multipart/alternative mails in case HTML or RichText
is selected as body format. This is the way outlook does it, too.
The sender update fix is a bit mushed in as this is now all
update_oom_data.