tbf/bts, encoding: Keep track of WAIT_RELEASE state for DL assignment

The current code does not properly distinguish between DL assignments to
reuse a tbf (after it was put in state WAIT_RELEASE) and DL assignments
for an active tbf to change the allocation of the PDCH timeslots.

This patch introduces a new variable was_releasing which remembers if
trigger_dl_ass() was called with a tbf in state WAIT_RELEASE. In that
case we have to set the CONTROL_ACK field in the download assignment.

This should allow us to send DL assignments to change PDCH TS allocation
of a tbf before we enter FLOW state.
diff --git a/src/tbf.h b/src/tbf.h
index 24b98d2..0ee9718 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -217,6 +217,10 @@
 	 * stops to iterate over all tbf in its current form */
 	enum gprs_rlcmac_tbf_state state;
 
+	/* Remember if the tbf was in wait_release state when we want to
+	 * schedule a new dl assignment */
+	uint8_t was_releasing;
+
 	/* store the BTS this TBF belongs to */
 	BTS *bts;