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 @SEQUENCE_NUMBER@ support in versionformat for git

Mark the commit count since @PARENT_TAG@, if there
is no @PARENT_TAG@, will count since first commit.