Enables db2 server disconnects to be handled pessimistically

A checkout listener can be added to sqlalchemy to be able to handle
database disconnect pessimistically and avoid an error in the event of
a DB restart or simply a temp connection issue due to network
glitches. At the moment only mysql is enabled with this feature. This
patch enables db2 as well.

Sync oslo db.sqlalchemy from commit：
bb4d7a2534f6087d828e22784dc263522d309592

Partial-Bug: #1231657

Change-Id: Ib89de07f004975528baffdfd19aae689b089a324
Merge "Enables db2 server disconnects to be handled pessimistically"