Fixed #19031 -- Added a warning when using override_settings with 'DATABASES'

https://code.djangoproject.com/ticket/19031

Updated version of https://github.com/django/django/pull/1095