[ONNX] Add constant folding for Softmax op (#102861)
This commit adds a torch implementation for the ONNX Softmax op, which allows it to be folded during ONNX export if all its inputs are known.
Fixes #97927
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102861
Approved by: https://github.com/BowenBao