Make Opinfo a dataclass to get a more useful repr
Fixes #74320. If we make OpInfo a dataclass we should change the method `default_test_dtypes` name because there is also an argument with the same name (or change the argument name). Right now I've changed the method name because it seems to be used only twice.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75663
Approved by: https://github.com/mruberry