Return error row instead of crashing
Return error row instead of crashing

When input is invalid for built in reducers, we return an error row
instead of crashing. Thanks to davisp for providing the elegant
solution.

COUCHDB-3305

fkaempfer/couchdb,fkaempfer/couchdb,apache/couchdb-couch,fkaempfer/couchdb,fkaempfer/couchdb,apache/couchdb-couch,fkaempfer/couchdb,apache/couchdb-couch,fkaempfer/couchdb