Pass WT_PANIC to __wt_err so that applications can catch panics.

refs #1354