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.
Revert "Fixed #20296 -- Allowed SafeData and EscapeData to be lazy"

This reverts commit 2ee447fb5f8974b432d3dd421af9a242215aea44.

Conflicts:
	tests/utils_tests/test_safestring.py