Implement pessimistic connection invalidation (MySQL only):

Check every connection that has been checked out from pool, and
invalidate it if it's stale.