cmd/dist: use vfprintf on Windows, same as on Unix
cmd/dist: use vfprintf on Windows, same as on Unix

Apparently, the Windows routines sometimes fail to generate output.
Copy the Unix stdio-based implementations instead.

Suggested by Pietro Gagliardi in CL 65280043 but that CL
seems to have been abandoned.

Fixes issue 7242.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/71550044

firebitsbr/golang-old,wesolows/golang,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang,wesolows/golang-old,wesolows/golang,wesolows/golang,wesolows/golang-old,wesolows/golang-old,wesolows/golang