rts/linker/MachO: Ensure that GOT relocations have GOT entries
Previously we failed to give GOT slots to symbols which were referred to by GOT relocations in the same module. This lead to #25577 (closed).
Fix this by explicitly traversing relocation lists and maintaining a
needs_got
flag for each symbol.
Fixes at least part of #25577 (closed).