Allow 3-level DB configs to group connections by environment
#28095

matthewd wants to merge matthewd:nested-database-config into rails:master

We do not currently have an analysis of these two commits