add @TAG_OFFSET@ support in versionformat for git

Mark the commit count since @PARENT_TAG@, if there
is no @PARENT_TAG@, will count since first commit.

Well, previous pull request was closed incorrect by me, so another one is here.
I'm slightly less keen on this case, since the output of the command is not a tag offset; it's an offset from the beginning of the history.  We could instead call it `@SEQUENCE_NUMBER@` or similar, although I'm slightly dubious that it's a good idea for projects to be using this, since it stops being chronologically monotonic the moment branches are used.