cmd/compilebench: make it work without installed .a's
cmd/compilebench: make it work without installed .a's

Currently compilebench relies on installed .a files for std and
cmd, as it runs the compiler and linker directly. For the upcoming
Go 1.20, compiled .a files will not be installed. Don't rely on
them. Instead, build importcfg file and pass it to the compiler
and the linker.

Verified that this approach still works with previous versions of
Go (1.19 and 1.18).

For golang/go#47257.

Change-Id: Ie0eb9541fb995649e5b68d4481a5acfbdfe8f2a7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/448118
Reviewed-by: Michael Pratt <e7f1edc6d5aa9f6c8c377425db8f1a5816cbbb88@google.com>
gopls-CI: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Michael Matloob <4562438b12c14e81a47550acde616ff328a909f8@golang.org>
Reviewed-by: Than McIntosh <4b2922593166fc595a9b1a408f34f5d3817fe9d2@google.com>
Run-TryBot: Cherry Mui <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

golang/tools,golang/tools,golang/tools,golang/tools,golang/tools