[1.7.x] Fixed #21649 -- Added optional invalidation of sessions when user password changes.

Thanks Paul McMillan, Aymeric Augustin, and Erik Romijn for reviews.

Backport of fd23c06023 from master
[1.7.x] Fixed #22216 -- Added Form.non_field_errors to form API doc.

Backport of d2f4553d705951ca8043d687f9493c559f494a0c from master