MB-7629: Add built-in _stats reduce/rereduce function for views

Change-Id: If11156b181c25b1f61222a2a02dca0fa39bda9da
Reviewed-on: http://review.couchbase.org/26889
Tested-by: Fulu Li <fulu@couchbase.com>
Reviewed-by: Fulu Li <fulu@couchbase.com>