cmd/link/internal/loadpe: refactor readpesym()
cmd/link/internal/loadpe: refactor readpesym()

Rewrite the helper "readpesym()" and the code that calls it to pass in
most of the values it needs via a state object (the signature was
getting a bit too busy/lengthy). No change in functionality, this is
just a refactor.

Updates #35006.

Change-Id: I6153ee3a9be3eb885694323ae8e07ec4c8eed646
Reviewed-on: https://go-review.googlesource.com/c/go/+/382836
Reviewed-by: Cherry Mui <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Trust: Than McIntosh <4b2922593166fc595a9b1a408f34f5d3817fe9d2@google.com>
Run-TryBot: Than McIntosh <4b2922593166fc595a9b1a408f34f5d3817fe9d2@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

nawawi/go,CAFxX/go,CAFxX/go,CAFxX/go,nawawi/go,nawawi/go,CAFxX/go,nawawi/go,CAFxX/go,CAFxX/go,golang/go,nawawi/go,golang/go,nawawi/go,CAFxX/go,golang/go,golang/go,nawawi/go,golang/go,golang/go,golang/go,nawawi/go,golang/go,CAFxX/go