[1.3.x] Fixed #18135 -- Close connection used for db version checking

On MySQL when checking the server version, a new connection could be
created but never closed. This could result in open connections on
server startup.

Backport of 4423757c0c50afbe2470434778c8d5e5b4a70925.
Reverted "[1.3.x] Fixed #18135 -- Close connection used for db version checking"

This reverts commit a15d3b58d8c4cbb6137f0458544ec03f3394bb08. Django
1.3.x is in security fixes only state, and this wasn't a security
issue.
[1.3.x] Fixed a security issue in image uploading. Disclosure and release forthcoming.

Backport of dd16b17099b7d86f27773df048c5014cf439b282 from master.
[1.3.x] Fixed second security issue in image uploading. Disclosure and release forthcoming.

Backport of b1d463468694f2e91fde67221b7996e9c52a9720 from master.
[1.3.x] Fixed a security issue in http redirects. Disclosure and new release forthcoming.

Backport of 4129201c3e0fa057c198bdefcb34686a23b4a93c from master.
[1.3.x] Bump version numbers for security releases.
[1.3.x] Use correct download URL.
[1.3.x] Fixed #18692 -- Restored python 2.4 compatibility.

Thanks to chipx86 for the report.
[1.3.x] Bump version numbers for bugfix release.
Fixed a security issue related to password resets

Full disclosure and new release are forthcoming

backport from master
[1.3.x] Bump version numbers for security release.
Added missed poisoned host header test material
[1.3.X] Fixed #18856 -- Ensured that redirects can't be poisoned by malicious users.
[1.3.X] Fixed a security issue in get_host.

Full disclosure and new release forthcoming.
[1.3.x] Bump version numbers for security release.
[1.3.X] Fixed a test failure in the comment tests.

Backport of 1eb0da1c5ba3096f218d1df13d02a2b8e1ac7a36 from master.
Import django.core.urlresolvers.reverse a little bit later.

This fixes our url mangling when permalinks are used - it's a slight
hack, but won't break anything. This can be reverted if we do it
the slightly harder but "right" way using an explicit mangling
method.
Allow post save redirects to be callable.
Support filtering by non-database (queryset) fields in the admin.
Fix for static admin validation with non-database field filters