HibernateJpaDialect only resets Connection read-only status if actually necessary (avoiding side effects)

Issue: SPR-8959
Issue: SPR-12118