build SQL_REPORTING_DATABASE_URL off django database settings
ensure connections to DB are closed after use
close db connections
update fluff
update for options in db settings
Merge pull request #3791 from dimagi/reportdb

build SQL_REPORTING_DATABASE_URL off django database settings
scoped session factory