Fix ORM scripts for 42f677bab2e4880b62758614fcb2c7dc27013788.

Updating common Python module used by ORM scripts (create_db.sh/migrate_db.sh/db_shell.py) to allow the same configuration via enviornment variables as well. Thanks to Bjoern for the bug report/feature request.
Continue flailing on environment variable configuraiton of Galaxy.

Expand variables earlier right in app_factory so middleware, etc... pick up defaults/overrrides.

In particular GALAXY_CONFIG_OVERRIDE_DEBUG should now work properly - because the sample config template overrides debug's default.

Thanks to Bjoern for the bug report.