Set up settings folder to allow deploy targets

The first argument to the provision script will be taken as the
installation type.
Cleanup from review
Make db setup more idempotent.

Adds individual checks for database user and template database existence
before trying to create them.
Auto-generate parts of Django settings

Specifically, the secret key and database settings are auto-generated to
avoid security holes and make sure that the Django DB settings match
what is in the provision script.