Fix issue introduced in PR #23163
# What does this PR do?

Fix issue introduced in PR #23163.

The previous `torch_version` is removed (which is not a string but a `version` type), and `get_torch_version()` is introduced and used (which is a string). In some places, it is compared against `self.torch_onnx_minimum_version` which is a string, and we know get on CI `TypeError: '<' not supported between instances of 'str' and 'Version'`.

This PR fixes this problem and avoid the > 1000 test failures.

(cc. @apbard FYI)
_The documentation is not available anymore as the PR was closed or merged._<|||||>FYI, after #23163,  `is_bs4_available()` and `is_faiss_available()` gives `False` even if they are actually available. This causes some CI errors, in particularly, `MarkupLM`.

I will fix this in a separate PR.