gbproxy: Add new VTY-managed timer: link-list clean-stale-timer

This timer allows periodically cleaning up stale links in link-list of
each gbproxy_peer. Previous to this patch, this kind of cleanup
(gbproxy_remove_stale_link_infos) was being done only as a consequence
of external events being triggered, such as a message from that peer
being received.
It was found in a production network agreggating several BSS that some
of them were offline for a longtime but gbproxy was still caching big
amounts of really old link_info for the NSEI assigned to those BSS,
because since they were probably turned off abruptely, no new messages
were received from it which would trigger the cleanup.
As a consequence, it has been observed that a timer to periodically
clean up old entries (link-list max-age) is requird in case w don't
receive messages from that NSEI periodically.

Related: SYS#4431
Change-Id: Ic777016f6d4f0e30fb736484774ca46878f17b7a
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 16082fc..7e2ae42 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -105,6 +105,8 @@
 	struct osmo_plmn_id core_plmn;
 	uint8_t* core_apn;
 	size_t core_apn_size;
+	/* Frequency (sec) at which timer to clean stale links is fired (0 disabled) */
+	unsigned int clean_stale_timer_freq;
 	/* If !0, Max age to consider a struct gbproxy_link_info as stale */
 	int tlli_max_age;
 	/* If !0, Max len of gbproxy_peer->list (list of struct gbproxy_link_info) */
@@ -151,6 +153,9 @@
 	struct rate_ctr_group *ctrg;
 
 	struct gbproxy_patch_state patch_state;
+
+	/* Fired periodically to clean up stale links from list */
+	struct osmo_timer_list clean_stale_timer;
 };
 
 struct gbproxy_tlli_state {