[rpc] Add a debug only check to debug python cleanup races (#35395)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35395
as title
ghstack-source-id: 101035263
Test Plan: CI
Differential Revision: D20632634
fbshipit-source-id: 737e353982b325e73da3825b130aae6b11dbcfe7