gbproxy: Remove global state from the gbproxy

Global state prevents us from writing simple units tests for
single routines. Go through the code and add pointers to the
gbproxy configuration. Only the vty and the test code remain
using the global gbproxy instance.
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index aa909ef..63daaff 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -470,7 +470,7 @@
 
 	switch (event) {
 	case GPRS_NS_EVT_UNIT_DATA:
-		return gbprox_rcvmsg(msg, nsvc->nsei, bvci, nsvc->nsvci);
+		return gbprox_rcvmsg(&gbcfg, msg, nsvc->nsei, bvci, nsvc->nsvci);
 	default:
 		break;
 	}
@@ -789,7 +789,7 @@
 
 	dump_global(stdout, 0);
 
-	gbprox_reset();
+	gbprox_reset(&gbcfg);
 	gprs_ns_destroy(nsi);
 	nsi = NULL;
 }
@@ -921,7 +921,7 @@
 	dump_global(stdout, 0);
 	dump_peers(stdout, 0);
 
-	gbprox_reset();
+	gbprox_reset(&gbcfg);
 	gprs_ns_destroy(nsi);
 	nsi = NULL;
 }
@@ -1057,7 +1057,7 @@
 	dump_global(stdout, 0);
 	dump_peers(stdout, 0);
 
-	gbprox_reset();
+	gbprox_reset(&gbcfg);
 	gprs_ns_destroy(nsi);
 	nsi = NULL;
 }
@@ -1324,7 +1324,7 @@
 	osmo_init_logging(&info);
 	log_set_use_color(osmo_stderr_target, 0);
 	log_set_print_filename(osmo_stderr_target, 0);
-	osmo_signal_register_handler(SS_L_NS, &test_signal, NULL);
+	osmo_signal_register_handler(SS_L_NS, &test_signal, &gbcfg);
 
 	log_set_print_filename(osmo_stderr_target, 0);
 	log_set_log_level(osmo_stderr_target, LOGL_DEBUG);