ensure pool.reset event always called for reset
Fixed issue where the :meth:`.PoolEvents.reset` event hook would
not be called when a :class:`.Connection` were closed which already
closed its own transaction. Logic that bypasses the "rollback on return"
behavior of the pool was also skipping the event hook being emitted,
preventing custom pool reset schemes from being used within this hook.
This was a regression that appeared in version 1.4.
For version 1.4, the hook is still not called in the case of an asyncio
connection that is being discarded due to garbage collection. Version 2.0
will feature an improved version of :meth:`.PoolEvents.reset` which also
receives contextual information about the reset, so that comprehensive
"custom connection reset" schemes can be devised. Existing custom
reset schemes that make use of :meth:`.PoolEvents.checkin` remain
usable as they typically only need to deal with connections that are to
be re-used.
Change-Id: Ie17c4f55d02beb6f570b9de6b3044baffa7d6df6
Fixes: #8717
(cherry picked from commit
bb8c36c5d2622e6e7033dc59dc98da0926ba7c00)