Speedup commit_is_merged() by reducing number of commits inspected.
Speedup commit_is_merged() by reducing number of commits inspected.

It is achieved by:
* maintaning a set of already visited commits;
* looking at commit mark ordering, one commit cannot be merged
  into another if first one is younger.

satori/git-svn-fast-import,satori/git-svn-fast-import,satori/git-svn-fast-import