Fix version script to use git revision. Close #1

Expanded the version script (responsible for creating and updating
build_version.h, which contains the date and version string). Apart from using
bzr and svn revision numbers, it can now also get the current Git revision
from an existing .git folder. This includes widening of the variables for the
revision from mere numbers to strings. Currently a git revision string will be
the word "git" followed by the first 8 digits of the current commit's SHA1.