Explicitly forbidden the other inherited methods of RemoteModule. (#43895)
Summary:
Throw exceptions when the methods except for forwardXXX are used.
Original PR issue: RemoteModule enhancements #40550
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43895
Test Plan: buck test test/distributed/rpc:process_group_agent -- RemoteModule
Reviewed By: rohan-varma
Differential Revision: D23392842
Pulled By: SciPioneer
fbshipit-source-id: 7c09a55a03f9f0b7e9f9264a42bfb907607f4651