Prevent infinite loop of OSM element fetching.

Keep a record of OSM elements fetched, to prevent dying upon
a circular dependency. This happens currently with e.g.
<http://www.openstreetmap.org/relation/3518103> and
<http://www.openstreetmap.org/relation/3490901>.
Don't cache when using local Overpass server.

This uses up a lot of disc space, plus the database is local anyway.
Fix Travis PostGIS/GDAL dependency problems.

Travis now currently uses the pgdg and ubuntugis-stable APT
repositories, which conflict in that e.g. pgdg contains
postgresql-9.1-postgis-2.1 (and PostGIS 2.1 is preinstalled before we
start) dependent on GDAL 1.9, but ubuntugis-stable's python-gdal is
dependent on GDAL 1.10.

Thanks to Mark Longair for investigating this.
Merge branch 'global-circular-spotting-and-less-disc-space-using'