llc_queue: Refactor to handle codel_state per prio queue internally

A CoDel state per prio queue is needed, otherwise the sojourn time state
is not properly reset when a high prio packet is dequeued.

If we have a global codel state shared for all prio queues of an MS, then
basically high prio (GMM) packets will "never" be dropped because they are
handled/dequeued way quicker, so it's sojourn time will be below the
threshold most probably, stopping the "dropping" state for the rest of
lower prio packets.

The handling of different codel states is moved from MS object to the
llc_queue, also offloading already loaded dl_tbf.cpp in the process.
This will also allow in the future setting different CoDel parameters
for different priority queues if needed.

Tests need to be adapted since now the CoDel and PDU lifetime are
incorporated into the llc_queue_dequeue(). Also because dequeue now also
accesses related MS fields.

Related: OS#5508
Change-Id: I2bce2e82ab6389d8a70130a5c26a966a316b0fa4
diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index 63f454f..6dc11a6 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -113,19 +113,15 @@
 	ms->imsi[0] = '\0';
 	memset(&ms->timer, 0, sizeof(ms->timer));
 	ms->timer.cb = ms_release_timer_cb;
-	llc_queue_init(&ms->llc_queue);
+	llc_queue_init(&ms->llc_queue, ms);
 
 	ms_set_mode(ms, GPRS);
 
 	codel_interval = the_pcu->vty.llc_codel_interval_msec;
+	if (codel_interval == LLC_CODEL_USE_DEFAULT)
+		codel_interval = GPRS_CODEL_SLOW_INTERVAL_MS;
+	llc_queue_set_codel_interval(&ms->llc_queue, codel_interval);
 
-	if (codel_interval != LLC_CODEL_DISABLE) {
-		if (codel_interval == LLC_CODEL_USE_DEFAULT)
-			codel_interval = GPRS_CODEL_SLOW_INTERVAL_MS;
-		ms->codel_state = talloc(ms, struct gprs_codel);
-		gprs_codel_init(ms->codel_state);
-		gprs_codel_set_interval(ms->codel_state, codel_interval);
-	}
 	ms->last_cs_not_low = now_msec();
 	ms->app_info_pending = false;