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.
Adding `strip()` seems reasonable, but it's not clear to me why it's needed.  Please can you split this change into a separate commit, and provide the explanation in the commit message?  Similarly, the variable renaming should be in its own commit - [one logical change per commit](http://blog.adamspiers.org/2012/11/10/7-principles-for-contributing-patches-to-software-projects/#cleanliness).