close database connection

To prevent:

> could not receive data from client: Connection reset by peer

see https://github.com/ui/django-rq/issues/17 and
http://pythonhosted.org/Flask-SQLAlchemy/contexts.html for details