Fixes a couple of issues found when running tests on the device

Continues work on #348 
Related to discussion on https://github.com/couchbase/couchbase-lite-net/pull/352