MB-7629: Add view id btree reduce/rereduce function

Change-Id: I312d237f522ac06b5de8a7305d9afcf1528f0986
Reviewed-on: http://review.couchbase.org/26724
Tested-by: Fulu Li <fulu@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>