Fix flaky test_rref_context_debug_info (#57526)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57526
This test would create an RRef, delete that rref and then create two
more RRefs and validate total rrefs were 2 in the end.
Due to the async nature of delete, sometimes the RRef would not be deleted
until the assertion was made. As a result, I've fixed this by waiting for the
RRef to be deleted at the appropriate time.
#Closes: https://github.com/pytorch/pytorch/issues/55382
ghstack-source-id: 128037566
Test Plan: waitforbuildbot
Reviewed By: H-Huang
Differential Revision: D28173151
fbshipit-source-id: e4f34ff4e49b72cfc9e67a72c482f5e05159eda5