Use event.listen() instead of deprecated listeners kwarg
Use event.listen() instead of deprecated listeners kwarg

The listeners kwarg is deprecated in SQLAlchemy 0.7.0.
Use the new event.listen() method instead.

Instead of using the original approach of testing whether or not the string
'mysql' is in 'connection_dict.drivername', now we are using a more direct
string equality test to ensure that engine.name == 'mysql' before passing
it to sql.event.listen().

We've decided to change the name of our ping_listener function to reflect its
purpose more accurately. Its name has been changed from "ping_listener" to
"mysql_on_checkout".

Change-Id: Ib9ef52404e3d474a60cdc82e8fcf8c6a9616bce3
Fixes: bug #1031405

maestro-hybrid-cloud/keystone,rickerc/keystone_audit,rajalokan/keystone,rodrigods/keystone,ntt-sic/keystone,rodrigods/keystone,jamielennox/keystone,dims/keystone,townbull/keystone-dtrust,ilay09/keystone,himanshu-setia/keystone,jamielennox/keystone,rickerc/keystone_audit,ajayaa/keystone,dstanek/keystone,cernops/keystone,blueboxgroup/keystone,promptworks/keystone,vivekdhayaal/keystone,rickerc/keystone_audit,cloudbau/keystone,UTSA-ICS/keystone-kerberos,derekchiang/keystone,klmitch/keystone,roopali8/keystone,rushiagr/keystone,jumpstarter-io/keystone,dsiddharth/access-keys,citrix-openstack-build/keystone,citrix-openstack-build/keystone,promptworks/keystone,UTSA-ICS/keystone-kerberos,rajalokan/keystone,jumpstarter-io/keystone,jumpstarter-io/keystone,nuxeh/keystone,dims/keystone,openstack/keystone,nuxeh/keystone,reeshupatel/demo,ntt-sic/keystone,ilay09/keystone,jonnary/keystone,idjaw/keystone,ilay09/keystone,MaheshIBM/keystone,rushiagr/keystone,dstanek/keystone,openstack/keystone,klmitch/keystone,townbull/keystone-dtrust,JioCloud/keystone,takeshineshiro/keystone,mahak/keystone,blueboxgroup/keystone,vivekdhayaal/keystone,JioCloud/keystone,ging/keystone,maestro-hybrid-cloud/keystone,townbull/keystone-dtrust,dstanek/keystone,promptworks/keystone,rajalokan/keystone,takeshineshiro/keystone,dsiddharth/access-keys,derekchiang/keystone,reeshupatel/demo,rushiagr/keystone,reeshupatel/demo,cloudbau/keystone,mahak/keystone,idjaw/keystone,ajayaa/keystone,mahak/keystone,MaheshIBM/keystone,nuxeh/keystone,himanshu-setia/keystone,derekchiang/keystone,jonnary/keystone,cloudbau/keystone,dsiddharth/access-keys,openstack/keystone,cernops/keystone,ging/keystone,citrix-openstack-build/keystone,roopali8/keystone,ntt-sic/keystone,vivekdhayaal/keystone