Export mimeheaders as a module, rather than as bits.
Have transfer encoding decode take a reference.
Reimplement multipart boundary parsing to improve performance.

This should limit allocations of strings by not having to split & then
do endless trimming.