[LV][NFC]Introduce isScalableVectorizationAllowed() to refactor getMaxLegalScalableVF().
Adds isScalableVectorizationAllowed() and the corresponding data member
to query if the scalable vectorization is supported rather than
performing the analysis each time the scalable vector factor is
requested.
Part of https://github.com/llvm/llvm-project/pull/91403
Reviewers: ayalz, fhahn
Reviewed By: fhahn, ayalz
Pull Request: https://github.com/llvm/llvm-project/pull/98916