Add new PDCH UL Controller, drop SBAllocator class

Right now we handle different types of UL allocations in different
classes like PollAllocator and SBAllocator, and they usually don't take
into account the other one in most cases. Furthermore, those objects are
usually per-BTS object, instead of per PDCH object.

This is a first step towards having a unified per-PDCH controller which
takes care of controlling what is scheduled and hence expected on the
uplink. Each PDCH has a UL Controller which keeps track of all reserved
uplink frame, be it SB, RRBP poll or USF assigned, all under the same
API.

As a first step, only the SBA part is fully implemented and used (being
it the easiest part to replace); TBF poll+usf will come in follow-up
patches later on. As a result, the SBAllocator per-BTS class dissappears
but some of its code is refactored/reused to provide more features to the
gprs_rlcmac_sba object, which is also further integrated into the new UL
Controller.

Related: OS#5020
Change-Id: I84b24beea4a1aa2c1528f41435f77bd16df2b947
diff --git a/src/pcu_utils.h b/src/pcu_utils.h
index 1d43045..a153ce7 100644
--- a/src/pcu_utils.h
+++ b/src/pcu_utils.h
@@ -25,6 +25,7 @@
 #endif
 
 #include <time.h>
+#include <stdint.h>
 
 static inline int msecs_to_frames(int msecs) {
 	return (msecs * (1024 * 1000 / 4615)) / 1024;
@@ -40,6 +41,15 @@
 	ts->tv_nsec = (csecs % 100) * 10000000;
 }
 
+static inline uint32_t rts_next_fn(uint32_t rts_fn, uint8_t block_nr)
+{
+	uint32_t fn = rts_fn + 4;
+	if ((block_nr % 3) == 2)
+		fn++;
+	fn = fn % GSM_MAX_FN;
+	return fn;
+}
+
 #ifdef __cplusplus
 template <typename T>
 inline unsigned int pcu_bitcount(T x)