Fixed #18349 -- Added ipv6 support to django.contrib.gis.geoip.

Thanks to j and fcurella for original patches.