Add vty cmd 'cdr trap' to send CDR through CTRL iface

Default behavior is to have them disabled, and can be explicitly
disabled too by using 'no cdr trap' cmd.

Tested with osmo_ctrl.py that messages are send successfully:
TRAP 0 cdr-v1 20171129125950222,901700000015254,357737055592090,555,0,5,,pdp-periodic,2731,127.0.0.2,127.0.0.1,internet,176.16.222.3,20793,10045,1

Related: OS#2360

Change-Id: I1d144d87effd934d991257a65e19cf046a938907
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index fe4192b..b2a028c 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -76,6 +76,7 @@
 #include <getopt.h>
 
 void *tall_bsc_ctx;
+struct ctrl_handle *g_ctrlh;
 
 struct gprs_ns_inst *sgsn_nsi;
 static int daemonize = 0;
@@ -367,7 +368,6 @@
 
 int main(int argc, char **argv)
 {
-	struct ctrl_handle *ctrl;
 	int rc;
 #if BUILD_IU
 	struct osmo_sccp_instance *sccp;
@@ -454,9 +454,9 @@
 
 	/* start control interface after reading config for
 	 * ctrl_vty_get_bind_addr() */
-	ctrl = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(),
+	g_ctrlh = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(),
 				    OSMO_CTRL_PORT_SGSN);
-	if (!ctrl) {
+	if (!g_ctrlh) {
 		LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n");
 		exit(1);
 	}