Add mock.patch() to clear environment for test (#53537)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53537
fixes #53526
This fixes the issue of the one of the environment variables being tested is somehow set by a previous test. For example:
`WORLD_SIZE=1 python test/distributed/test_c10d.py RendezvousEnvTest.test_common_errors` would have previously failed but now passes
Test Plan: Imported from OSS
Reviewed By: samestep
Differential Revision: D26891207
Pulled By: H-Huang
fbshipit-source-id: 1c23f6fba60ca01085a634afbafbb31ad693d3ce