Walk to imports in `isconst(::GlobalRef)` (#57563)
This restores 1.11 behavior. However, I find this function a bit
problematic, since it is asking whether the binding is `constant` in a
particular sense, but not whether it is `const` (in the sense of having
been declared with the keyword or equivalent), so the shortening is
confusing. However, we don't need to address that now. Fixes #57475.