ci: Updating Jenkins-CI and Travis-CI scripts

This commit makes use of has function from `util.sh` script, enables
dependency installation for Jenkins-CI, and unifies dependency
installation between Jenkins-CI and Travis-CI.

Change-Id: I5f4419ea48d4eb333e9d107115ef3df4123f76e5
Refs: #2805
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 3bc96ce..970bc94 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -2,13 +2,13 @@
 set -x
 set -e
 
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
 # Prepare environment
-rm -Rf ~/.ndnx ~/.ndn
+rm -Rf ~/.ndn
 
-echo $NODE_LABELS
-IS_OSX=$( python -c "print 'yes' if 'OSX' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
-
-if [[ $IS_OSX == "yes" ]]; then
+if has OSX $NODE_LABELS; then
   echo "Unlocking OSX Keychain"
   security unlock-keychain -p "named-data"
 fi