Add pickling support for WorkerInfo (#73371)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73371
This PRs allows for the pybinded class `WorkerInfo` to be pickled. The class is pickled into a tuple of worker_name and rank in format `(NAME, ID)`. This allows WorkerInfo to be passed as an argument for RPC calls.
Test Plan: Imported from OSS
Reviewed By: mrshenli
Differential Revision: D34458153
Pulled By: H-Huang
fbshipit-source-id: 7b8f99960bdc0e24021e252d8c8138bcb53f698c
(cherry picked from commit 8fb119bf760eef9f313a44e9287c9253cbb09cae)