[IR] Return early in Constant::getRelocationInfo (NFC) (#240044)
getRelocationInfo() scans a constant's operands to find the strongest
relocation kind it needs (none, local, or global). Once it sees an
operand that needs a global relocation, the result cannot change, so we
can return right away.
Part of #236952.
Assisted-by: Gemini