Fix for ChannelMapper fn losing its wrapper after the first call
Fix multipart parsing for case with multiple identical attachments

Fixes #96.
GET /db/doc should use multipart if caller accepts both it and JSON

CBL sends "Accept: multipart/related, application/json" but the
gateway chose to send the document as JSON not multipart, even if it has
attachments. Fixed this.
Will now default to multipart if there are attachment bodies, else JSON,
unless caller sends an Accept: header that omits one or the other type.
Fixes couchbase/couchbase-lite-ios#70
Merge branch 'master' into fb_auth