Fixed #7261 -- support for __html__ for library interoperability

The idea is that if an object implements __html__ which returns a string this is
used as HTML representation (eg: on escaping). If the object is a str or unicode
subclass and returns itself the object is a safe string type.

This is an updated patch based on jbalogh and ivank patches.
Updated admin alert colors

refs #21220.
Moved misplaced import in backends init
Fixed #16855 -- select_related() chains as expected.

select_related('foo').select_related('bar') is now equivalent to
select_related('foo', 'bar').

Also reworded docs to recommend select_related(*fields) over select_related()
Made sqlite introspection also show views like other backends

Refs #6730.
Fixed DeprecationWarning caused by assertEquals.
Merge pull request #1755 from loic/typo

Fixed DeprecationWarning caused by assertEquals.
Merge pull request #1744 from unaizalakain/ticket_7261

Fixed #7261 -- support for __html__ for library interoperability
Improve migration optimizer to be able to optimize through other ops
First pass on squashmigrations command; files are right, execution not.
Fixed #7551 -- Made GFK allow None init argument.

Thanks SamBull for the report.
Avoided hardcoding Permission.name max_length

refs #18866.
Fixed #19657 -- Made sql commands honor allow_migrate

Thanks Manel Clos for the report and the initial patch, and
Marc Tamlyn and Tim Graham for the review.
Add get_migratable_models util method to ConnectionRouter
Fixed #21270 -- Fixed E701 pep8 warnings
Merge pull request #1762 from alasdairnicol/ticket_21270

Fixed #21270 -- Fixed E701 pep8 warnings
Removed some dead code and simplified some other ocde
Fixed #21280 -- Don't generate empty migration files
Remove some unnecesary uses of bool
Fixed #18659 -- Deprecated request.REQUEST and MergeDict

Thanks Aymeric Augustin for the suggestion.