Only apply DATABASE_URL for Rails.env

As we like ENV vars, also support DATABASE_URL_#{env}, for more obscure use cases.

This needs more tests:

* There's nothing about the 'DATABASE_URL_FOO' handling
* And nothing showing that a normally-configured "foo" is unaffected by the DATABASE_URL (unless our current env is called 'foo')

Also, the `config` method could probably look substantially less awful.

#14616 // @rafaelfranca