Feature/speedup flagops

not finished yet, but since I'm stacking several commits, maybe the review can start.

currently I'm fixing a problem with duplication of headers, I believe it's a bug in the imap.server multipart implementation that is still lacking a bit. but it might have been some slip in the conversion to inline defers