Add tests for documents/views-changes

Closes COUCHDB-2282