Fix parsing of TLV_TYPE_SINGLE_TV

The decoding path of TLV_TYPE_SINGLE_TV is wrong, since it is not
shifting right the tag before using it. On the other hand, the encoding
path (tlv_encode_one) is doing that, so it is clear there's a bug.

It seems that in order to workaround the bug some IEs in gsm_04_08.h (TS
24.008 and TS 44.018) were defined incorrectly (eg 0x80) while the spec
clearly assigns eg. "8" to it, and makes sure no full byte IEI collides.
Some other IEIs like GSM48_IE_GMM_CIPH_CKSN which are also of the same
type were already correctly defined as 0x08.

Change-Id: I799e35dc8d4d153fa63bf50563a5482cdf4de2d7
diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c
index de76688..e47b94f 100644
--- a/src/gsm/tlv_parser.c
+++ b/src/gsm/tlv_parser.c
@@ -241,7 +241,9 @@
 	*o_tag = tag;
 
 	/* single octet TV IE */
-	if (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV) {
+	if (def->def[tag >> 4].type == TLV_TYPE_SINGLE_TV
+	    /* backward compat for old IEs with half-octet tag defined as 0xN0: */
+	    || ((tag > 0x0f) && (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV))) {
 		*o_tag = tag & 0xf0;
 		*o_val = buf;
 		*o_len = 1;