Register torch.return_types.* as pytree nodes
All of the torch.return_types.* are these special things "structseq"
that subclass tuple but have a different constructor from tuple :(.
This PR iterates through all of torch.return_types.* and adds a pytree
registration for them.
Test Plan:
- add tests for max and min which return torch.return_types.max, and
torch.return_types.min, respectively. There's not an easy way to
"get all torch ops that return a return_types object".
Fixes https://github.com/pytorch/pytorch/issues/75218
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75915
Approved by: https://github.com/ezyang, https://github.com/kshitij12345