go/packages: fix flaky TestJSON
go/packages: fix flaky TestJSON

Visit packages in deterministic order for predictable JSON.

(I don't know why the test only appears to fail on darwin;
I would expect it to randomly fail in linux 50% of the time.)

Change-Id: I5270804077fc9ca8f529a1f4657e1c35f0586579
Reviewed-on: https://go-review.googlesource.com/130755
Reviewed-by: Michael Matloob <4562438b12c14e81a47550acde616ff328a909f8@golang.org>

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