Fix some memory leak issue in mapreduce unit test

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