MB-7656 Don't segfault on empty reductions and buffers
MB-7656 Don't segfault on empty reductions and buffers

If the reduction was 0, this was segfaulting. If the input buffer
was 0 too, which it segfaulted too.

Both cases are valid for views, and therefore it shouldn't segfault.

Change-Id: I5b5ac1466135fa0cd50641afa0744113b9bfd248
Reviewed-on: http://review.couchbase.org/28844
Reviewed-by: Aaron Miller <41fcc51335f382e0855796cc35dd33f571f2d8f7@ninjawhale.com>
Reviewed-by: Volker Mische <fb414f8ac0dbbf87663550ae4ef5fc95b1041941@gmail.com>
Tested-by: Aaron Miller <41fcc51335f382e0855796cc35dd33f571f2d8f7@ninjawhale.com>

vmx/couchstore,vmx/couchstore,abhinavdangeti/couchstore,jimwwalker/couchstore,vmx/couchstore,t3rm1n4l/couchstore,couchbaselabs/couchstore,t3rm1n4l/couchstore,jimwwalker/couchstore,abhinavdangeti/couchstore,abhinavdangeti/couchstore,jimwwalker/couchstore,couchbaselabs/couchstore,t3rm1n4l/couchstore,couchbaselabs/couchstore