[JIT] pickle serialization for custom bound classes
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32604
Test Plan: Imported from OSS
Differential Revision: D19566633
fbshipit-source-id: 9387d3ff45cbd6ccde49ce190a52859481cc301c