Fix `c10d` -> `dist` in `test_ddp_hooks.py` (#61864)
Summary:
**Overview:**
The existing `test_ddp_hooks.py` test file uses a prefix `c10d`, which is not defined in the file, meaning the test errors if left as is. This renames each `c10d` prefix to `dist`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61864
Test Plan:
All four tests pass when run:
```
gpurun python test/distributed/algorithms/ddp_comm_hooks/test_ddp_hooks.py
```
Reviewed By: ejguan
Differential Revision: D29783860
Pulled By: andwgu
fbshipit-source-id: 16bdd2dfcb76192964246148f14851a74f8907c8