testing: report test as failed if the test panics.

Fixes issue 5149.

R=golang-dev, dave, minux.ma
CC=golang-dev
https://codereview.appspot.com/8136043

Committer: Dave Cheney <dave@cheney.net>