csync statedb: Open the statedb in read only mode and with mutex set.

For that, sqlite3_open_v2 is used with the appropiate flags.
csync statedb: Issue a warning if sqlite is not compiled thread safe.
csync statedb: Set PRAGMA synchronous to NORMAL for read only db.
Two little typo fixes.
SyncJournal: Use the NOCASE Collate for blacklist query.
SyncJournal: Use precompiled statement in blacklist query.