Unwrap SQLException when checking if error is retryable

And switch utf8_bin to ucs_binary so it is actually testing what it thinks it is (interestingly, shaves off about 1s per getCount() invocation).