fix @PARENT_TAG@ with suffix broken issue

This is caused by the spare endlines in output
of safe_run(), strip it will be fine.
add @TAG_OFFSET@ and @SEQUENCE_NUMBER@ support in versionformat for git

@TAG_OFFSET@ will mark the commit count since
@PARENT_TAG@, and @SEQUENCE_NUMBER@ will mark the
commit count since the first commit.