Use STL threading primitives in DatabaseDetails and DatabaseManager