Fixed #22788 -- Ensured custom migration operations can be written.

This inspects the migration operation, and if it is not in the
django.db.migrations module, it adds the relevant imports to the
migration writer and uses the correct class name.
Use __first__ not __latest__ for unknown app dependencies
Fixed #22848: Ignore no-migrations errors during makemigrations only
Fixed #22783: Make sure swappable models come first in creation
Fixed #22847: Optimizer wasn't expecting unresolved FKs
Added database migration for contrib.contenttypes.

Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.
Fixed flake8 error.
Added database migration for contrib.auth.

refs #22170.
Fixed #22845 -- Correctly handled memcached default timeout value.
Ignore through being None on some special cases of fields.
Ignore more blank throughs on swapped-out M2Ms
Removed some u'' prefixes to fix Python 3.2.
Renamed DatabaseFeature.supports_check_constraints to supports_column_check_constraints.

Thanks maxi for the suggestion.
Fixed #22851: BinaryView wasn't getting a binary default
Fixed #21498: Don't use a fallback language if you're en-us.
Fix test breakage on MySQL
Fixed #22819 -- Renamed output_type -> output_field in query expression API.

Thanks jorgecarleitao for the suggestion.
Fixed #22577: Python 3 broke on non-module migrations directory
Tutorial: Consistent url syntax
Merge pull request #2824 from valberg/22577

Fixed #22577: Python 3 broke on non-module migrations directory