veyron/tools/build: Support for cgo

The "C" package is a pseudo-package and thus attempts to import it will fail.
The lack of special handling for the C pseudo-package was causing tests on
OS X to fail with:

--- FAIL: TestBuildClient (0.03s)
        impl_test.go:66: Import("C","",0) failed: cannot find package "C" in any of:
                        /Users/ashankar/veyron/environment/go/src/pkg/C (from $GOROOT)
                        /Users/ashankar/veyron/third_party/go/src/C (from $GOPATH)
                        /Users/ashankar/veyron/tools/go/src/C
                        /Users/ashankar/veyron/veyron/go/src/C
                        /Users/ashankar/veyron/environment/golib/src/C

since after https://veyron-review.googlesource.com/#/c/3698/
the package being built in TestBuildClient has a dependency on the C pseudo-package
on OS X
(veyron/runtimes/google/rt depends on C)

The test was passing on linux because the C dependency doesn't exist there.
But builds of real packages which require "cgo" would have failed.

Change-Id: I34ef496e2e77da568318652a4a5dcda8f7c88b67
diff --git a/tools/build/impl/impl.go b/tools/build/impl/impl.go
index 473ba65..4c2b17e 100644
--- a/tools/build/impl/impl.go
+++ b/tools/build/impl/impl.go
@@ -72,6 +72,11 @@
 			srcDir, mode := "", build.ImportMode(0)
 			pkg, err := build.Import(path, srcDir, mode)
 			if err != nil {
+				// "C" is a pseudo-package for cgo: http://golang.org/cmd/cgo/
+				// Do not attempt recursive imports.
+				if pkg.ImportPath == "C" {
+					continue
+				}
 				return fmt.Errorf("Import(%q,%q,%v) failed: %v", path, srcDir, mode, err)
 			}
 			if pkg.Goroot {