Fixed #16184 -- Fixed multiple PostGIS types introspection

Thanks radim.blazek@gmail.com for the report and initial patch.
Testing is tricky, as the failure condition is a bit of an edge
case. inspectapp.InspectDbTests should at least guarantee non
regression.
Fixed a flake8 warning
Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.

Thanks Claude Paroz for the review.

Conflicts:
	docs/ref/contrib/gis/install/geolibs.txt
	docs/releases/1.8.txt
Fixed #23514 -- Prevented queries in PostGISOperations init

Thanks Mattia Procopio for the report.
Fixed #21357 -- Fixed test client session initialization.

The test client will now create a session when it is first accessed
if no session already exists.