cmd/compile: fix TestAssembly on Plan 9
cmd/compile: fix TestAssembly on Plan 9

Since CL 23620, TestAssembly is failing on Plan 9.

In CL 23620, the process environment is passed to 'go tool compile'
after setting GOARCH. On Plan 9, if GOARCH is already set in the
process environment, it would take precedence. On Unix, it works
as expected because the first GOARCH found takes precedence.

This change uses the mergeEnvLists function from cmd/go/main.go
to merge the two environment lists such that variables with the
same name in "in" replace those in "out".

Change-Id: Idee22058343932ee18666dda331c562c89c33507
Reviewed-on: https://go-review.googlesource.com/23593
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Run-TryBot: David du Colombier <ec8ae1e6620d4bab5e0e7aa2a6ae41aad63e3708@gmail.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

4ad/go,codestation/go,theif519/go,momchil-velikov/go,momchil-velikov/go,ImJasonH/go,ImJasonH/go,CAFxX/go,theif519/go,josharian/go,linux-on-ibm-z/go,derekmarcotte/go,vsekhar/elastic-go,suncycheng/go,theif519/go,polyverse-security/go,linux-on-ibm-z/go,ImJasonH/go,derekmarcotte/go,CAFxX/go,suncycheng/go,ImJasonH/go,4ad/go,akutz/go,Cofyc/go,vsekhar/elastic-go,josharian/go,christopher-henderson/Go,golang/go,goodlang/good,linux-on-ibm-z/go,4ad/go,akutz/go,josharian/go,cloudflare/go,CAFxX/go,suncycheng/go,derekmarcotte/go,codestation/go,cloudflare/go,polyverse-security/go,codestation/go,ImJasonH/go,golang/go,goodlang/good,linux-on-ibm-z/go,polyverse-security/go,akutz/go,momchil-velikov/go,Cofyc/go,CAFxX/go,vsekhar/elastic-go,cloudflare/go,momchil-velikov/go,suncycheng/go,goodlang/good,cloudflare/go,Cofyc/go,polyverse-security/go,theif519/go,akutz/go,josharian/go,momchil-velikov/go,vsekhar/elastic-go,linux-on-ibm-z/go,linux-on-ibm-z/go,goodlang/good,polyverse-security/go,Cofyc/go,akutz/go,golang/go,josharian/go,derekmarcotte/go,polyverse-security/go,nawawi/go,ImJasonH/go,vsekhar/elastic-go,codestation/go,4ad/go,nawawi/go,suncycheng/go,cloudflare/go,Cofyc/go,codestation/go,vsekhar/elastic-go,suncycheng/go,Cofyc/go,vsekhar/elastic-go,golang/go,theif519/go,polyverse-security/go,4ad/go,goodlang/good,theif519/go,nawawi/go,nawawi/go,goodlang/good,momchil-velikov/go,momchil-velikov/go,nawawi/go,josharian/go,akutz/go,suncycheng/go,ImJasonH/go,4ad/go,golang/go,cloudflare/go,josharian/go,derekmarcotte/go,nawawi/go,theif519/go,akutz/go,CAFxX/go,cloudflare/go,CAFxX/go,golang/go,derekmarcotte/go,linux-on-ibm-z/go,derekmarcotte/go,Cofyc/go,4ad/go,derekmarcotte/go,codestation/go,ImJasonH/go,golang/go,nawawi/go,vsekhar/elastic-go,4ad/go,golang/go,cloudflare/go,goodlang/good,polyverse-security/go,CAFxX/go,akutz/go,CAFxX/go,codestation/go,suncycheng/go,josharian/go,nawawi/go,momchil-velikov/go,codestation/go,goodlang/good,theif519/go,Cofyc/go,linux-on-ibm-z/go