Rename deadlock/retryable exception detection methods to be public rather than psuedoprivate

It turns out this kind of detection is useful in application logic too.

We also make them static, which is particularly useful as exception handlers don't necessarily have access to the raw database handle, for various reasons.