Finally fixed the multipart JSON-decoding bugs

Fixes #288
Fixes #289
Tweaked logging in CBLReplication.m some more.