Check database opened before purge exp docs in bg (#2285)
Check database opened before purge exp docs in bg (#2285)

* Need to check whether database (_c4db) is still opened before purging the expired doc in the background.
* Add error log when purging is failed.
couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios