cmd/coordinator: add more detail on reverse pool's in-use counts

Also:

* work around a Chrome bug in flushing chunks and mime detection
  in the log handler.
* fix Makefile missing files
* fix vet bug where Println should be Printf
* include builder name & rev at top of output, so they're included
  uniformally in failure log's bodies. (for trybots they were in the URL,
  but for non-trybots they were not and you had to carefully analyze
  the failure body to guess the OS/arch/options, which wasn't always
  possible)

Fixes golang/go#10723

Change-Id: I7db5e4c31f51f6be8223be45d36019e3c62ce27d
Reviewed-on: https://go-review.googlesource.com/10050
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/cmd/coordinator/coordinator.go b/cmd/coordinator/coordinator.go
index 8e87da0..fbfb862 100644
--- a/cmd/coordinator/coordinator.go
+++ b/cmd/coordinator/coordinator.go
@@ -493,6 +493,7 @@
 	defer st.mu.Unlock()
 	fmt.Fprintf(w, "  builder: %s\n", st.name)
 	fmt.Fprintf(w, "      rev: %s\n", st.rev)
+	workaroundFlush(w)
 	fmt.Fprintf(w, " buildlet: %s\n", st.bc)
 	fmt.Fprintf(w, "  started: %v\n", st.startTime)
 	done := !st.done.IsZero()
@@ -507,6 +508,16 @@
 		st.writeEventsLocked(w, false)
 	}
 	io.WriteString(w, "\nBuild log:\n")
+	workaroundFlush(w)
+}
+
+// workaroundFlush is an unnecessary flush to work around a bug in Chrome.
+// See https://code.google.com/p/chromium/issues/detail?id=2016 for the details.
+// In summary: a couple unnecessary chunk flushes bypass the content type
+// sniffing which happen (even if unused?), even if you set nosniff as we do
+// in func handleLogs.
+func workaroundFlush(w http.ResponseWriter) {
+	w.(http.Flusher).Flush()
 }
 
 // findWorkLoop polls http://build.golang.org/?mode=json looking for new work
@@ -994,6 +1005,7 @@
 
 	execStartTime := time.Now()
 	st.logEventTime("pre_exec")
+	fmt.Fprintf(st, "%s at %v\n\n", st.name, st.rev)
 
 	remoteErr, err := bc.Exec(path.Join("go", st.conf.AllScript()), buildlet.ExecOpts{
 		Output:      st,