[ONNX] Improve stability of gemm export (#46570)
Summary:
Export as `onnx::MatMul` if possible since it has less constraint. Resolves issue with exporting `weight_norm` in scripting that fails onnx shape inference with `onnx::Gemm` in unreachable `if` subgraph.
Updates skipped tests list.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46570
Reviewed By: ngimel
Differential Revision: D24657480
Pulled By: bzinodev
fbshipit-source-id: 08d47cc9fc01c4a73a9d78c964fef102d12cc21c