[RPC Framework] Support retrieving the RRef to the remote module (#48983)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48983
Expose an API for users to retrieve the RRef for the underlying module.
This would be useful if users would like to run custom code on the remote end for the nn.Module.
Original PR issue: RemoteModule enhancements #40550
ghstack-source-id: 118378601
Test Plan: buck test mode/dev-nosan caffe2/test/distributed/rpc:process_group_agent -- RemoteModule
Reviewed By: pritamdamania87
Differential Revision: D25386042
fbshipit-source-id: 2dff33e8d5c9770be464eacf0b26c3e82f49a943