MB-8710 Optimize view reducers

Avoid decoding the same reductions and values multiple times,
reducing cpu consumptiom and memory allocations.

Change-Id: I54372df280998181d871dd18cce9339c5cbd9215
Reviewed-on: http://review.couchbase.org/27684
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Fulu Li <fulu@couchbase.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>