Cleanup tool finding functions

There was a duplicate definition of `gocode`, and `gofmt` didn't correctly search `$PATH`, and might as well use the helper function `gopathBinOrPathItem`.
You're right, `gofmt` is in the bin dir, side-by-side with `go`. Which is why it looks for GOROOT from `go env` to find it. Can you run `go env` on each of those systems you describe and paste the output?