Handle --version eagerly to avoid loading the entire infrastructure (#13575)
Currently, handling `--version` in `pytest_cmdline_main` requires loading the entire infrastructure, which can be slow depending on the installed plugins.
This change introduces a marginal behavioral difference, though it should not cause any issues in practice.
Fixes #13574