[MERGE] sql_db: improve performance of previous patch for auto-detecting dead connections
[MERGE] sql_db: improve performance of previous patch for auto-detecting dead connections

Avoid calling reset() on connections that are used +
only do it on the connection that is being returned,
which is much more efficient.
gisce/openobject-server,gisce/openobject-server,MarkusTeufelberger/openobject-server,splbio/openobject-server,gisce/openobject-server,splbio/openobject-server,MarkusTeufelberger/openobject-server,MarkusTeufelberger/openobject-server,splbio/openobject-server