Refactor install_docker_compose function

Usually this function is followed by a run command, this change
ensure that docker-compose program is installed before its execution

Change-Id: Ic68616a1db1e3c5bee516985c74f369a956d6775
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: INT-436
diff --git a/bootstrap/vagrant-onap/lib/commons b/bootstrap/vagrant-onap/lib/commons
index 5d0c691..90f73d2 100755
--- a/bootstrap/vagrant-onap/lib/commons
+++ b/bootstrap/vagrant-onap/lib/commons
@@ -32,13 +32,16 @@
     source /etc/os-release || source /usr/lib/os-release
     case ${ID,,} in
         *suse)
+            CHECK_CMD="zypper search --match-exact --installed"
         ;;
         ubuntu|debian)
-            dpkg -s "$@" > /dev/null
+            CHECK_CMD="dpkg -l"
         ;;
         rhel|centos|fedora)
+            CHECK_CMD="rpm -q"
         ;;
     esac
+    ${CHECK_CMD} "$@" &> /dev/null
 }
 
 # install_packages() - Install a list of packages