[handover] Real handover algorithm

This implements the handover algorithm (and associated parameters)
as described in Chapter 8 of the book "Performance Enhancements in
a Frequency |Hopping GSM Network" by Thomas Toftegard Nielsen and Jeroen
Wigard.

The parameters such as averaging windows are configured in struct
gsm_network.  We keep some state to trakc up to 10 neighbors as
they are being reported from the MS.

This has so far only been tested in a network with two BTS that
have each other as neighbor.  Networks with morge neighbors might
encounter bugs.
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 281982e..156927f 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1404,6 +1404,7 @@
 	 * imagine an IMSI DETACH happening during an active call! */
 
 	/* subscriber is detached: should we release lchan? */
+	lchan_auto_release(msg->lchan);
 
 	return 0;
 }