MB-11845: Handle couchstore_open_db_ex's failure scenario

Context: couchstore_compact_db_ex
If couchstore_open_db_ex were to fail in this context,
then in the cleanup couchstore_close_db(Db* ) would fail
as the Db pointer is NULL.

Change-Id: I0e843972a680c677be5e6d72bfe3308efa2d547e
Reviewed-on: http://review.couchbase.org/40031
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>