One instance of db connection

Current version has possibility to open two database connections -- if one call dbPromise() simultaneously one after another. I fixed it by storing the promise of db opening request.