Add git version handling to build system

When building from a git tree, the version number built into the
binary will be appended with +git-XXXXXXXX.

The base version number is stored in-tree in configure.in and is that
of the last tagged release.  Presumably the git version is later than
the last tag, so we use '+git' rather than '-git' to produce the
correct the lexical sort order -- though of course the sort order
between any two git revisions can only be determined from the git tree
rather than from a lexical sort.