[scm] Improve Commits class to count unique commit revisions instead
      of commits.

This chage may affect aggregated data of commit activity in forked
repositories. Commits are now counted using the hash value.