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/Makefile.am b/openbsc/tests/Makefile.am
index c0e48df..c9afeed 100644
--- a/openbsc/tests/Makefile.am
+++ b/openbsc/tests/Makefile.am
@@ -4,6 +4,10 @@
 SUBDIRS += bsc-nat
 endif
 
+if BUILD_SMPP
+SUBDIRS += smpp
+endif
+
 
 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
 $(srcdir)/package.m4: $(top_srcdir)/configure.ac