applied patches from https://code.djangoproject.com/attachment/ticket/16778

Conflicts:
	django/contrib/gis/db/backends/postgis/adapter.py
Merge pull request #4 from percious/stable/1.3.x

applied patches from https://code.djangoproject.com/attachment/ticket/16...