[ONNX] Fix `hardshrink` and `softshrink` output's shape (#79695)
Part of #79263
Before: When the shape of the two functions is `[]`, the reduced output has `[1]` shape.
After: The shape of the two functions is now `[]` as PyTorch's behavior.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79695
Approved by: https://github.com/justinchuby, https://github.com/BowenBao