Lock out setup_database method

 so that multiple gunicorn workers don't attempt to initialize DB at the same time

Fixes #710 !

@dmp42