Fixed #22699 -- Configure default settings in some management commands.

This makes it possible to run django.setup() in management commands that
don't need a settings module. In addition it simplifies error handling.

Thanks Claude for the review.
Fixed #21630 -- Simplified management command discovery

Thanks Aymeric Augustin for the report end the review.
Removed an old compatibility shim added in 1.0
Fix a regression introduced by f011b90363.

`django.get_version` was actually used by the module.
Argument to `reversed` must be a sequence on Py3.
Fixed #22601 -- Added a note about model inheritance.

Thanks semenov for the report.
Fixed spelling in docs.
Fixed #22714 -- Made contrib.gis use six-provided memoryview type

Thanks Tim Graham for the report.
Fixed #22715: Corrected sql for defaults of BinaryField on Oracle with Python3

While at it, fixed a problem in returning empty values
(still with BinaryField/Oracle/Python3).
Fixed #22684 -- Added `empty_label` option on `django.forms.extras.widets.SelectDateWidget`

Thanks danielsamuels for the report
Fixed constant_time_compare on Python 2.7.7

Python 2.7.7 includes compare_digest in the hmac module, but it requires
both arguments to have the same type. This is usually not a problem on
Python 3 since everything is text, but we have mixed unicode and str on
Python 2 -- hence make sure everything is bytes before feeding it into
compare_digest.
Set straight the sense of 'uppercases_column_names' feature flag
Fixed #20081 -- Minimized risk of SECRET_KEY leak.

By default set the SECRET_KEY value to be loaded from env vars.  If not
set and DEBUG==True generate a random SECRET_KEY.  Also adds the
generatesecret management command, which prints a random secret key to
stdout.
fixed typo.  Thanks Pentusha.
Updated to store SECRET_KET in a file by default.

Added generatesecretfile management command and util functions to create
and read the secret key file.