Cleanup database state variable (#2788)
Cleanup database state variable (#2788)

* replace the bool with state variable.
couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios