postgis: module parametrization

Massive code cleanup using far less classes but with a parameter for
the postgresql version.

Include classes for redhat support (not actually implemented) and removed
ancient ubuntu support.