This commit splits the debian/update-dch-from-git script, factoring
out the code that determines the version, leaving behind the code that
updates the changelog.
This way the version information can be used to overwrite the VERSION
file, and generally be useful elsewhere.