cmd/dist: apply minor fixes
cmd/dist: apply minor fixes

This belongs to a series of clean-up changes (see below) for cmd/dist.
This is change (1).

These changes include:
(1)  apply minor fixes
(2)  restore behavior of branchtag
(3)  unleash bootstrap optimization for windows
(4)  use standard generated code header
(5)  remove trivial variables + functions
(6)  move functions for the better
(7)  simplify code segments
(8)  use bytes.Buffer for code generation
(9)  rename variables + functions
(10) remove doc.go

Change-Id: I49e5f2a9b6146e2b60a067da5bac31434ffc9aaf
Reviewed-on: https://go-review.googlesource.com/60650
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Run-TryBot: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

nawawi/go,codestation/go,akutz/go,Cofyc/go,cloudflare/go,polyverse-security/go,josharian/go,CAFxX/go,josharian/go,CAFxX/go,nawawi/go,Cofyc/go,CAFxX/go,golang/go,christopher-henderson/Go,golang/go,CAFxX/go,golang/go,codestation/go,cloudflare/go,josharian/go,CAFxX/go,golang/go,codestation/go,golang/go,Cofyc/go,nawawi/go,akutz/go,cloudflare/go,golang/go,Cofyc/go,golang/go,codestation/go,cloudflare/go,polyverse-security/go,Cofyc/go,codestation/go,cloudflare/go,josharian/go,akutz/go,codestation/go,Cofyc/go,golang/go,cloudflare/go,Cofyc/go,akutz/go,Cofyc/go,akutz/go,nawawi/go,akutz/go,polyverse-security/go,polyverse-security/go,josharian/go,CAFxX/go,polyverse-security/go,nawawi/go,CAFxX/go,polyverse-security/go,polyverse-security/go,CAFxX/go,josharian/go,codestation/go,cloudflare/go,akutz/go,akutz/go,polyverse-security/go,codestation/go,cloudflare/go,nawawi/go,josharian/go,josharian/go,nawawi/go,nawawi/go