disable irinterp for interpreters with `may_optimize(...)=false` (#53580)
As discussed at
<https://github.com/JuliaLang/julia/commit/b8a0a3978ccf163ce8fc371a4882547dc1271d53#commitcomment-139076159>,
currently external abstract interpreter that configures `may_optimize`
to return `false` may end up with the internal error from irinterp since
it fundamentally required optimized IR but it currently assumes that all
sources from cached `CodeInstance`s are optimized.
This commit addresses the issue by incorporating a `may_optimize` check
in `concrete_eval_eligible`, which in turn automatically disables
irinterp for such interpreters. Although there were earlier discussions
suggesting the revival of `codeinfo.inferred::Bool`, this commit does
not need it, and I think this approach maintains the current state more
cleanly.
This should fix the error of `"inference"` benchmarks from
BaseBenchmarks.jl.