Fixed a crash reporting errors from a CBLReplication

NOTE: This patch was made on the stable branch as a fix for beta 2.
It does _not_ need to be merged into master, because CBLReplicator has
been rewritten since beta 2 and this bug doesn’t exist there.

Fixes #220