Contrib: ensure that cmake >= 3.1 is available for required targets.

In particular, this change allows to build opentracing-cpp, thrift,
and jaeger tracer plugin on RHEL/CentOS 7 with the "cmake3" package
installed.
diff --git a/contrib/Makefile b/contrib/Makefile
index 8466893..c9c2129 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -62,6 +62,15 @@
 SHA512SUM = $(error SHA-512 checksumming not found)
 endif
 
+ifndef CMAKE
+ifeq ($(shell cmake --version 2>&1 | grep -q -- "version 3.1" || echo FAIL),)
+CMAKE = cmake
+else ifeq ($(shell cmake3 --version 2>&1 | grep -q -- "version 3.1" || echo FAIL),)
+CMAKE = cmake3
+endif
+endif
+CMAKE ?= $(error cmake >= 3.1 not found)
+
 #
 # Common helpers
 #
diff --git a/contrib/src/jaeger-client-cpp/Makefile b/contrib/src/jaeger-client-cpp/Makefile
index 003373d..eac9cc0 100644
--- a/contrib/src/jaeger-client-cpp/Makefile
+++ b/contrib/src/jaeger-client-cpp/Makefile
@@ -24,7 +24,7 @@
 		cd .build && \
 		OpenTracing_DIR=$(PREFIX)/usr/local/lib/cmake/OpenTracing \
 		thrift_DIR=$(PREFIX)/usr/local/lib/cmake/thrift \
-		cmake \
+		$(CMAKE) \
 			-DBUILD_TESTING=OFF \
 			-DJAEGERTRACING_PLUGIN=ON \
 			-DCMAKE_BUILD_TYPE=Release \
diff --git a/contrib/src/opentracing-cpp/Makefile b/contrib/src/opentracing-cpp/Makefile
index 7c64532..27e2b5e 100644
--- a/contrib/src/opentracing-cpp/Makefile
+++ b/contrib/src/opentracing-cpp/Makefile
@@ -19,6 +19,6 @@
 	cd $< && \
 		mkdir -p .build && \
 		cd .build && \
-		cmake ../ && \
+		$(CMAKE) ../ && \
 		DESTDIR=$(PREFIX) make $(_SMP_MFLAGS) install
 	touch $@
diff --git a/contrib/src/thrift/Makefile b/contrib/src/thrift/Makefile
index 638df8a..735caaf 100644
--- a/contrib/src/thrift/Makefile
+++ b/contrib/src/thrift/Makefile
@@ -23,7 +23,7 @@
 	cd $< && \
 		mkdir -p .build && \
 		cd .build && \
-		cmake \
+		$(CMAKE) \
 			-DBUILD_TESTING=OFF \
 			-DBUILD_TUTORIALS=OFF \
 			-DBUILD_COMPILER=OFF \