MB-8531: Clean test shutdown

Change-Id: Ia008a07cdcb2760211c97721105ad27a2a90fdd5
Reviewed-on: http://review.couchbase.org/27566
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: buildbot <build@couchbase.com>