MB-7764 Add test for reduce functions that don't return

Validate that reduce functions that don't explicitly return,
implicitely return undefined, which is serialized to a JSON
value of null.

Change-Id: Ic6ac0fe98f968ab71784927a4b2e62e19fac06af
Reviewed-on: http://review.couchbase.org/24649
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>