db manager: fix connection holding - idle in transaction (QGIS bug #7162)