better guarding to handle torch compiled with USE_DISTRIBUTED=0 (#47619)
* better guarding to handle torch compiled with USE_DISTRIBUTED=0
* better test
* no private variable
* remove 2.5 guarding
* move is_torch_distributed_available() to utils.py
* create an is_dtensor function
* monkey patch test instead
* linting