Unlock shared db if bootstrapping fails in any way
Merge remote-tracking branch 'chiiph/bug/unlock_shared_if_failed' into develop
enable gzip compression
get_count_from_index
Merge remote-tracking branch 'refs/remotes/kali/feature/enable-gzip' into develop
Merge remote-tracking branch 'refs/remotes/kali/feature/expand-sqlicipher-capabilities' into develop
Make couch backend consistent and lightweight.

This commit introduces the use of couch view, list and update functions to put
and get data from the couch database. This avoids loads of metadata
transferring and encapsulates operations in atomic PUTs.
Fix couch tests to reflect remodelling.
Remove index tests for couch backend.
Add 'ddocs.py' generation on sdist.
Add database migration script.