rework automatic build versioning

Only release or preview builds now receive the designated version
as their identifier. Others are now known as 'git-something', or,
for debs/rpms '0.0-something' (or similar).

A new jenkins-driver script is included that moves actually setting
the versions out of the jenkins configuration.
Extending this script to drive the complete build is left for the
future.