[C10D] Improve MTPG autograd test. Fixes #105106 (#105356)
Explicitly asserts that bwd is running from the same thread as fwd.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105356
Approved by: https://github.com/rohan-varma, https://github.com/wanchaol, https://github.com/fduwjj