Create database indexes upfront in setup_db before starting the app.

This way we avoid race-conditions due to indexes not being created yet caused
by lazy index creation in mongoengine.
Merge pull request #777 from StackStorm/mongoengine_lazy_index_creation_race_fix

Create database indexes up-front in setup_db function before starting the app