cmd/go: delay parsing the testmain template
cmd/go: delay parsing the testmain template

The template is over a hundred lines and full of pipelines, and
text/template isn't optimised to parse quickly, so it's no wonder that
delaying the parsing to the first template use makes 'go env' much
faster.

Like in the previous patches to get rid of global regexp.MustCompile
vars, use the newly introduced lazytemplate package. Close to two full
milliseconds are shaved off of 'go env' runs.

name         old time/op    new time/op    delta
ExecGoEnv-8    4.27ms ± 0%    2.63ms ± 1%  -38.43%  (p=0.002 n=6+6)

Updates #29382.

Change-Id: I4e2569e51ddf2afe1b46eb1a9e9e5845f7a3b0bd
Reviewed-on: https://go-review.googlesource.com/c/155962
Run-TryBot: Daniel Martí <29bf28b42a938ace12a5819da4ed4ba03d82f315@mvdan.cc>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>

akutz/go,nawawi/go,golang/go,nawawi/go,CAFxX/go,cloudflare/go,josharian/go,nawawi/go,nawawi/go,cloudflare/go,akutz/go,josharian/go,akutz/go,CAFxX/go,CAFxX/go,nawawi/go,akutz/go,cloudflare/go,akutz/go,cloudflare/go,CAFxX/go,golang/go,CAFxX/go,nawawi/go,CAFxX/go,cloudflare/go,josharian/go,cloudflare/go,golang/go,akutz/go,akutz/go,golang/go,cloudflare/go,cloudflare/go,akutz/go,CAFxX/go,golang/go,josharian/go,golang/go,nawawi/go,CAFxX/go,josharian/go,josharian/go,josharian/go,golang/go,nawawi/go,golang/go,josharian/go