Added thread safety test to sqlite.