cmd/cgo: check for compiler errors in the C preamble

E.g., here's the new "go build" output:

$ go build misc/cgo/errors/issue8442.go
# command-line-arguments
could not determine kind of name for C.issue8442foo

gcc errors for preamble:
misc/cgo/errors/issue8442.go:11:19: error: unknown type name 'UNDEF'

Fixes issue 8442.

LGTM=iant
R=iant, alex.brainman
CC=golang-codereviews
https://codereview.appspot.com/129160043

Committer: Ian Lance Taylor <iant@golang.org>