[rpc] make pickler/unpickler pluggable in RPC (#53050)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53050
As title. We would like to use alternative pickler/unpickler
implementations without changing the entire RPCPickler, to make it
possible to send objects over the wire that are coming from a
torch.package
Test Plan: Imported from OSS
Reviewed By: Lilyjjo
Differential Revision: D26734592
Pulled By: suo
fbshipit-source-id: d9d9fa62ee15bfcb00e09192030541b61df8c682