Move DB config to environment config files R#798

Also, rename the environment config files to *-dist and add them to
.gitignore. This means that as part of installation, the *-dist files
should be renamed to *.yml. This way these files can be edited without
git getting in the way.