smpp: Move the coding/mode detection into a utils file

Make sure to not ever have issues with this code again, move the
utility code to a new file and create a basic testcase. The method
currently has 100% line and branch coverage. My initial patched
missed the smpp_utils.c file and I re-did the copying (and verifying
the branch coverage)
diff --git a/openbsc/tests/smpp/Makefile.am b/openbsc/tests/smpp/Makefile.am
new file mode 100644
index 0000000..eb25965
--- /dev/null
+++ b/openbsc/tests/smpp/Makefile.am
@@ -0,0 +1,12 @@
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_srcdir)/src/libmsc
+AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
+AM_LDFLAGS = $(COVERAGE_LDFLAGS)
+
+EXTRA_DIST = smpp_test.ok smpp_test.err
+
+noinst_PROGRAMS = smpp_test
+
+smpp_test_SOURCES = smpp_test.c \
+	$(top_srcdir)/src/libmsc/smpp_utils.c
+smpp_test_LDADD = $(LIBOSMOCORE_LIBS) \
+	$(top_srcdir)/src/libcommon/libcommon.a