Cleanup isAArch64FrameOffsetLegal by:
- Merging the large switch statement to reuse AArch64InstrInfo::getMemOpInfo().
- Using AArch64InstrInfo::getUnscaledLdSt() to determine whether an instruction has an unscaled variant.
- Simplifying the logic that calculates the offset to fit the immediate.
Probably good to note that this returns 0 if the opcode doesn't correspond to a scaled load or store.