Fix Travis PostGIS/GDAL dependency problems.

Thanks to Mark Longair for investigating this.

Also test the 1.7 stable branch.