CBQE-927: upgrade tearDown improvements

Change-Id: Ic1e0e85f5cee49543f77532b9ef875c90c9aa088
Reviewed-on: http://review.couchbase.org/23902
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>