send a doc and its attachments efficiently.

This change add the function `couchbeam:save_doc/4`.  If the attachments
is not empty, the doc will be sent as multipart and the attachments will
be streamed which is a way more efficient than using inline encoding.