Fixed #16612 -- Improved has_changed detection for localized field values

Thanks Simon Charette for the review.
Fixed #18898 -- Added tests with a fix for ModelMultipleChoiceField
Fixed #19960 -- Fixed sentence in contrib.auth signals docs

Thanks edd at slipszenko.net for the report.
Removed unused options copy in flush

This was used at the time the 'database' option did not default to
DEFAULT_DB_ALIAS in make_option.
Added import forgotten in 2ee21d9.

Thanks ratsonale for spotting this mistake.
Added a context manager to capture queries while testing.

Also made some import cleanups while I was there.

Refs #10399.
Fixed #10399 -- Tested that o2o field updates are not constrained by an inner query.
Import `CaptureQueriesContext` from its original module.
Fixed #15363 -- Renamed and normalized to `get_queryset` the methods
that return a QuerySet.