Use a local GeoIP database instead of Gaze if possible

A first pass at this -- be gentle :)