jmap_api: refactor getblob_context to avoid memory leaks
The heap-allocated content_type and encoding fields of getblob_context
get rewritten in the JMAP blob handlers. Rather than forcing developers
to deallocate previous values, we provide buffers for rewrites.