Fix exporters import on torch < 2.9 (is_contiguous_or_false) (#49124)
`is_contiguous_or_false` was added to `torch._prims_common` in torch 2.9.
The FA CI image is still on torch 2.8, so every model test fails to collect
since #47003 added the bare import at module level.
Guard with try/except and provide a semantically-equivalent fallback for
older torch: call `a.is_contiguous()` and return False on data-dependent
shape errors (matching the upstream behaviour).
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>