cmd/cgo: make C function pointers non-assignable

Fixes issue 7757.
Fixes issue 8488.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/118690044

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