when an empty header is last, the rest of the body keeps getting parsed
as headers. when header starts with '\n' because the value is long, the
value gets parsed as a name and the header parser fails.
Check subattachments in has_attachments check.
Instead of getting a flattened attachment view of multipart/mixed (eg
[multipart/mixed, text/plain, text/plain]) get only the subattachments
(eg [text/plain, text/plain]). Don't count text-only multipart/mixed as attachments
Each account had one mailbox per folder, which had one associated
collection. Now each Account has one Collection for all folders and each
Mailbox object holds only the hashes of each message.
Collection also gets Threads for each folder in order to mix messages
(ie from/to Sent folder).
Insert Sent emails in chronological order
if inserted unsorted, mails a, b with a happened-before b, might never
Fix multiple insertions in ThreadTree upon insert_reply
insert_reply was creating multiple copies in threading