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/src/libmsc/Makefile.am b/openbsc/src/libmsc/Makefile.am
index 7faee43..c36ba92 100644
--- a/openbsc/src/libmsc/Makefile.am
+++ b/openbsc/src/libmsc/Makefile.am
@@ -19,5 +19,5 @@
 			osmo_msc.c
 
 if BUILD_SMPP
-libmsc_a_SOURCES += smpp_smsc.c smpp_openbsc.c smpp_vty.c
+libmsc_a_SOURCES += smpp_smsc.c smpp_openbsc.c smpp_vty.c smpp_utils.c
 endif