Cleanup jenkins build scripts

* reorder builds to avoid rm -rf invocation
* avoid useless double autoreconf
* move common parts into shared helper
* move common build steps into separate function

Change-Id: I24e500e132f5c8e8133d35548cb7b4e4552331d0
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
new file mode 100644
index 0000000..e52a96a
--- /dev/null
+++ b/contrib/jenkins_common.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -ex
+
+verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
+
+autoreconf --install --force