[c10d] Implement `__instancecheck__` for `c10d::ReduceOp` (#88275)
Summary:
- Customize the metaclass of `torch.distributed.distributed_c10d.ReduceOp` for the sake of custom `__instancecheck__`
- Add `copy.copy`, `copy.deepcopy`, and `pickle` support with tests
Rel:
- #81272
- #84243
- #87191
- #87303
- #87555
Ref:
- https://github.com/pybind/pybind11/issues/2696
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88275
Approved by: https://github.com/wanchaol