a sqlite thread safety tools in ios