db_hlr.c: add db_subscr_exists_by_imsi()

Check if a subscriber exists without generating an error log entry if
it does not. This is cheaper than db_subscr_get_by_imsi(), as it does
not fetch the subscriber entry. subscriber-create-on-demand will use
this function.

Related: OS#2542
Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54
diff --git a/src/db.h b/src/db.h
index 3cb42e4..8543085 100644
--- a/src/db.h
+++ b/src/db.h
@@ -28,6 +28,7 @@
 	DB_STMT_AUC_3G_INSERT,
 	DB_STMT_AUC_3G_DELETE,
 	DB_STMT_SET_LAST_LU_SEEN,
+	DB_STMT_EXISTS_BY_IMSI,
 	_NUM_DB_STMT
 };
 
@@ -130,6 +131,8 @@
 			       const struct sub_auth_data_str *aud);
 int db_subscr_update_imei_by_imsi(struct db_context *dbc, const char* imsi, const char *imei);
 
+int db_subscr_exists_by_imsi(struct db_context *dbc, const char *imsi);
+
 int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi,
 			  struct hlr_subscriber *subscr);
 int db_subscr_get_by_msisdn(struct db_context *dbc, const char *msisdn,