sweet/go-build: set GOROOT correctly

Currently we just use a bare exec.Command and GOROOT may not be set
correctly for the first time we build it. That's an easy fix: use a
common.Go instead.

In the benchmark itself we still need to use a bare exec.Command, but
that's fine. Just set GOROOT in that case explicitly.

Change-Id: I9e00076d3d951ba5b83b63ddabfebcf68b60f73d
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/384654
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2 files changed