Adding wrapper for tests that change uri ENV variable

While working on RUBY-700 (ipv6 support), I realized that we don't properly unset and reset the ENV['MONGODB_URI'] in tests. I've added a wrapper that makes sure we reset the variable after altering it in the test, even when there is an exception.