[ONNX] Refactor `TestONNXRuntime` with parameterized class
* Refactor `TestONNXRuntime` with parameterized class, making it obvious whether
the unittest is testing on TorchScript or trace based export.
* Refactor rnn_tests with parametrized test cases.
Fixes #75630
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79641
Approved by: https://github.com/justinchuby, https://github.com/garymm