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.
I think the value should be stripped. This will still respect "internal" whitespace, but will remove leading and trailing whitespace. The most important reason for this, IMO, is that if you have `SECRET_KEY = 'foo'` and you move it to a file, and your editor automatically adds a final newline (which many editors do), that should not result in a subtly different secret key.