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/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 2837aa5..ac9aeb2 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -678,5 +678,22 @@
 osmo_i460_subchan_del;
 osmo_i460_ts_init;
 
+osmo_nri_v_validate;
+osmo_nri_v_matches_ranges;
+osmo_nri_v_limit_by_ranges;
+osmo_tmsi_nri_v_get;
+osmo_tmsi_nri_v_set;
+osmo_tmsi_nri_v_limit_by_ranges;
+osmo_nri_range_validate;
+osmo_nri_range_overlaps_ranges;
+osmo_nri_ranges_alloc;
+osmo_nri_ranges_free;
+osmo_nri_ranges_add;
+osmo_nri_ranges_del;
+osmo_nri_ranges_vty_add;
+osmo_nri_ranges_vty_del;
+osmo_nri_ranges_to_str_buf;
+osmo_nri_ranges_to_str_c;
+
 local: *;
 };