db_test: don't verify SQLite issued error messages, they might change

A user on openbsc@ complained that with SQLite 3.8.2, the db_test fails with

  --- expected
  +++ stderr
  -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi
  +DDB (2067) abort at 35 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi

i.e. a trivial difference in the error message issued by SQLite.

For db_test, don't output any SQLite error messages: Add argument
enable_sqlite_logging, pass as true, except in db_test.c.
Remove the SQLite error messages from expected output.

(Note that there is a src/db_test.c program that's not of interest here, this
is about the tests/db/db_test.c)

Change-Id: I2513d71cc0072aef8d08f47d0a1959f311176229
diff --git a/src/db.c b/src/db.c
index d16f8ec..cc06ee6 100644
--- a/src/db.c
+++ b/src/db.c
@@ -211,7 +211,7 @@
 	return 0;
 }
 
-struct db_context *db_open(void *ctx, const char *fname)
+struct db_context *db_open(void *ctx, const char *fname, bool enable_sqlite_logging)
 {
 	struct db_context *dbc = talloc_zero(ctx, struct db_context);
 	unsigned int i;
@@ -233,9 +233,11 @@
 			has_sqlite_config_sqllog = true;
 	}
 
-	rc = sqlite3_config(SQLITE_CONFIG_LOG, sql3_error_log_cb, NULL);
-	if (rc != SQLITE_OK)
-		LOGP(DDB, LOGL_NOTICE, "Unable to set SQLite3 error log callback\n");
+	if (enable_sqlite_logging) {
+		rc = sqlite3_config(SQLITE_CONFIG_LOG, sql3_error_log_cb, NULL);
+		if (rc != SQLITE_OK)
+			LOGP(DDB, LOGL_NOTICE, "Unable to set SQLite3 error log callback\n");
+	}
 
 	if (has_sqlite_config_sqllog) {
 		rc = sqlite3_config(SQLITE_CONFIG_SQLLOG, sql3_sql_log_cb, NULL);