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 setup.py.
Add database migration script.
Add changes file.