Use a more meaningful version number

Having v1.077-devel-HASH is not very useful, when we do proper tags and
releases with more meaningful version numbers, which we use in packages.

This commit moves the version calculation to the Makefile and passes it
to the deb/build script so the naming scheme is the same. It also adapts
the src/posix.mak file to honor the $(VERSION) variable if one is already
defined.