Made staff_member_required redirect to login

Refs #21911.
Fixed #21911 -- Made admin views redirect to login when needed

Historically, the Django admin used to pass through the request
from an unauthorized access to the login view directly. Now we
are using a proper redirection, which is also preventing
inadvertantly changing data when POSTing login data to an admin
view when user is already authorized.
Thanks Marc Tamlyn and Tim Graham for the reviews.
Removed the this_is_the_login_form hack

Refs #21911. Now that we have a more traditional login form, we
don't need any more a special field telling us we are dealing with
the login form.
Fixed #21929 - Fixed test regression on Windows.

Thanks Michael Manfre for the report.
Removed two imports which are now unused
Fix pep8 violation in migration template.
Fixed #21952 -- signals deadlock due to locking + weakref interaction
Simplified signal code.

Refs #21952
Fixed gendered examples in the docs.
Fixed ImportError when running contrib.gis tests without libgeos installed.
Revert "Fixed #20296 -- Allowed SafeData and EscapeData to be lazy"

This reverts commit 2ee447fb5f8974b432d3dd421af9a242215aea44.

That commit introduced a regression (#21882) and didn't really
do what it was supposed to: while it did delay the evaluation
of lazy objects passed to mark_safe(), they weren't actually
marked as such so they could end up being escaped twice.

Refs #21882.
Added previous commit to 1.6.2 release notes.
Removed import which is now unused
Extended the release notes for chainable Manager/QuerySet methods.

Refs #20625.
Added missing items to 1.6.2 release notes.
Fixed #21731 -- Made javascript_quote escapes '</'.
Fixed #17005 -- Added CurrentSiteMiddleware to set the current site on each request.

Thanks jordan at aace.org for the suggestion.
Fixed #17713 -- Renamed BaseDatabaseFeatures.allows_primary_key_0 to allows_auto_pk_0.

MySQL does allow primary key with value 0. It only forbids autoincrement
primary key with value 0.

Thanks Claude Paroz for the report.
Updated 1.6.2 release notes for release (and linkified tickets).
Bumped version number for 1.7a2