BTS: Convert relative frame numbers to absolute frame numbers

The implementation of the method rcv_rach() in class BTS, restores
the absolute frame number of the incoming RACH-Request by using
the relative frame number (RFn = Fn mod 42432) from the rach
request and the already known internal absolute frame number
m_cur_fn, which is continusly updated by the CCU interface.

In some rare cases, a RACH request might be received by the BTS,
a very short time before the frame number wraps in its 42432.
Depending on the PCU location, RACH request might be received
by the BSC, which forwards it to the PCU. It is then likely
that, while the RACH request is being forwarded to the PCU, the
PCU internal absolute frame number wraps before the RACH
can be processed. The relative frame number from the rach
request would then be interpreted as if it were received after
the wrapping of the internal frame number modulos.

This commit adds logic to detect and resolve this race condition.
Also a unit test is added to check some cornercases.

Change-Id: I74f00c11e5739d49f370ce6c357149e81d9aa759
diff --git a/src/bts.h b/src/bts.h
index 2932154..5d8dc59 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -349,6 +349,8 @@
 	int rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn);
 	uint8_t is_single_block(uint16_t ra, enum ph_burst_type burst_type,
 		uint8_t is_11bit, uint16_t *ms_class, uint16_t *priority);
+
+	uint32_t rfn_to_fn(uint32_t rfn);
 	int rcv_rach(uint16_t ra, uint32_t Fn, int16_t qta, uint8_t is_11bit,
 		enum ph_burst_type burst_type);