misc/cgo/test: add Test8517

CL 145890044 did not provide test. Rectify that.

Update issue 8517

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://codereview.appspot.com/148790043