Fix ESTestCase and 501/503 templates for middleware

ESTestCase now derives from django.test.TestCase which means
it requires DATABASES settings. This adds sqlite in-memory
settings to test_settings.py.

Moved the middleware error templates so that they're in
the elasticutils.contrib.django Django app.