Improved open with SQLITE_OPEN_NOMUTEX flag and mutex protection.