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.
Monkey-patch u1db to use CouchDocument.
Fix couch tests to reflect remodelling.
Remove index tests for couch backend.
Add 'ddocs.py' generation on setup.py.
Add database migration script.
Add changes file.
Add couch atomicity tests.
Merge remote-tracking branch 'refs/remotes/drebs/feature/consistent-metadata' into develop