Allow editing documents from view

Closes COUCHDB-2494
You could also do this like this:

    !_.isUndefined(hasReduceFunction = design.attributes.doc.views[viewName].reduce)