build: change the fallback version suffix to `+git.{sha}`

Seems to be more commonly used than the current `-commit-{sha}`.
Also cleanup/simplify the version handling code and fix the
list of dependencies in the CI scripts.

Change-Id: I438afdd31870b92c54dce30254a485ebb4667b56
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index d21e972..2bdc040 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -2,7 +2,8 @@
 set -eo pipefail
 
 APT_PKGS=(
-    build-essential
+    dpkg-dev
+    g++
     libboost-chrono-dev
     libboost-date-time-dev
     libboost-dev
@@ -16,7 +17,7 @@
     libsqlite3-dev
     libssl-dev
     pkg-config
-    python3-minimal
+    python3
 )
 FORMULAE=(boost openssl pkg-config)
 PIP_PKGS=()