Trim absolute paths in files generated by cgo (#3011)

The cgo command generates .c files that contain //line comments
referencing source files by absolute paths into the Bazel cache. As the
contents of these comments end up in the symbol table of the resulting
c-archive, this makes Bazel-built CGo binaries non-reproducible.

This is fixed by passing the -trimpath argument to cgo to trim the
Bazel execroot prefix from these paths.

Fixes #3010.
5 files changed