improve the close handling here so that we don't double-close a connection;
we log this now so it apparently happens a bunch
refactor test suites for postgresql, mssql, mysql into packages.
The behavior of :func:`.extract` has been simplified on the
Postgresql dialect to no longer inject a hardcoded ``::timestamp``
or similar cast into the given expression, as this interfered
with types such as timezone-aware datetimes, but also
does not appear to be at all necessary with modern versions
of psycopg2.  Also in 0.8.2.
[ticket:2740]