sgsn/test: Fix subscriber cleanup

Currently the subscribers are not really deleted by
cleanup_subscr_by_imsi, but kept in RAM instead.

This patch fixes this and adds a test to verify, that the subscriber
is really deleted afterwards.

Sponsored-by: On-Waves ehf
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c
index ba76f55..b83cfae 100644
--- a/openbsc/tests/sgsn/sgsn_test.c
+++ b/openbsc/tests/sgsn/sgsn_test.c
@@ -842,7 +842,10 @@
 
 	subscr = gprs_subscr_get_by_imsi(imsi);
 	OSMO_ASSERT(subscr != NULL);
-	gprs_subscr_delete(subscr);
+	subscr->keep_in_ram = 0;
+	subscr_put(subscr);
+	subscr = gprs_subscr_get_by_imsi(imsi);
+	OSMO_ASSERT(subscr == NULL);
 }
 
 static void test_gmm_attach_subscr(void)