Simplify TS alloc: split allocation

* generalize TS allocation and move it into separate function
* move single-slot allocation into separate function
* use common functions for TS allocation on both UL and DL

Change-Id: Ied45ae380c345bc76fe9d6fd9a6184d1109f83f2
Related: OS#2282
diff --git a/src/mslot_class.c b/src/mslot_class.c
index 87e37ca..6a7e25b 100644
--- a/src/mslot_class.c
+++ b/src/mslot_class.c
@@ -228,3 +228,11 @@
 
 	return -1;
 }
+
+void masked_override_with(char *buf, uint8_t mask, char set_char)
+{
+	int i;
+	for (i = 0; mask; i++, mask >>= 1)
+		if (mask & 1)
+			buf[i] = set_char;
+}