Clean up settings now that graphite requires Django>=1.4

``DATABASE_*`` is no longer relevant.

Also removed some compatibility code for older Django versions than 1.4.