Allow editing documents from view

Closes COUCHDB-2494
The can be simplified to `promise.then(function (resp) {`