Fix missing CodeInstance owner lookup in _jl_invoke (#58072)
`_jl_invoke` has a manually inlined version of `jl_method_compiled` that
was missing the `->owner` check. I don't think there's any strong reason
to duplicate this code path, so unify them and make sure the `->owner`
path is there. This fixes an issue where calling `CompilerDevTools`'s
`with_new_compiler` would cause the creation of CodeInstances that would
then be dispatched to outside the `with_new_compiler` context.