MB-17154: Improve error message code in view group
MB-17154: Improve error message code in view group

The error message code had memory leaks (uncovered by the Clang Analyzer
`scan-build`) and could also be simplified.

Change-Id: I2b7abd18b35853ab776fab98418a7784a8953d7e
Reviewed-on: http://review.couchbase.org/58051
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>
Reviewed-by: Harsha H S <b9c539375b0159a59a005865dce169c407c7d034@gmail.com>
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Abhishek Singh <0731fdeb307910eeaae4e58897b7baaba45e054b@couchbase.com>

couchbaselabs/couchstore,couchbaselabs/couchstore,couchbaselabs/couchstore