add gsm23236: MSC pooling: TMSI and NRI utility functions

These utilities will be used by osmo-bsc to determine the Network Resource
Indicator seen in the TMSI, and (potentially) by osmo-msc to compose a TMSI
with a specific NRI, for osmo-bsc's load balancing between several MSCs.

Add utility functions to:
- extract an NRI value from a TMSI.
- overwrite the NRI value in a TMSI.
- limit an NRI in a (random) TMSI to a given list of ranges.
- add NRI value ranges to a list.
- remove them from a list.
- match NRI value (range) to a list.
- parse NRI values from string, for VTY.
- common VTY functionality of adding/removing NRI values from argv.

Add C tests for the above.

Why we need public API for NRI ranges: In osmo-bsc alone, we need the same NRI
API twice, 1: to manage/list NRI value ranges per-MSC, and 2: to manage/list
NULL-NRI values. If we also consider (potentially) adding NRI support to
osmo-msc, we need the same API twice again there. Hence it is useful to define
re-used API up here in libosmocore.

Related: OS#3682
Change-Id: Icb57a2dd9323c7ea11b34003eccc7e68a0247bf5
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 4ff6671..a4c28f9 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -344,6 +344,12 @@
 AT_CHECK([$abs_top_builddir/tests/gsm23003/gsm23003_test], [0], [expout], [ignore])
 AT_CLEANUP
 
+AT_SETUP([gsm23236])
+AT_KEYWORDS([gsm23236])
+cat $abs_srcdir/gsm23236/gsm23236_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/gsm23236/gsm23236_test], [0], [expout], [ignore])
+AT_CLEANUP
+
 AT_SETUP([tdef])
 AT_KEYWORDS([tdef])
 cat $abs_srcdir/tdef/tdef_test.ok > expout