fix: avoid generating -Wl for dynamic libraries with an interface (#4574)

**What type of PR is this?**

> Bug fix

**What does this PR do? Why is it needed?**

_cc_libs_and_flags only collected files from LibraryToLink.libraries and
ignored
linker_input.additional_inputs, so any files provided via that field
were never added to the GoCompilePkg or
GoLink sandboxes. Additionally, when a LibraryToLink has both
interface_library and dynamic_library set, adding
the dynamic_library to libs caused it to flow into cgo_deps, which the
GoLink rpath generation loop iterated
over — with many such libraries this generates enough -Wl,-rpath flags
to exceed the OS argument limit. The fix
collects additional_inputs from each linker input and makes them
available to the compile sandbox, while
dynamic_library from interface+dynamic pairs is tracked separately as
link_inputs and threaded through GoArchive
to GoLink as plain sandbox inputs — bypassing rpath generation entirely.

**Which issues(s) does this PR fix?**

Follow up to https://github.com/bazel-contrib/rules_go/pull/4569 which
it incorrectly fixed.

**Other notes for review**

---------

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
9 files changed