Implement `git log` history simplification

When native `git log` is called with a pathspec, it only includes commits that are not TREESAME to any parent (TREESAME means that pathspec is not modified between the commit and its parent).  If more than one parent is TREESAME to the commit, native git only follows the first one.  `Repository#log` now implements these history simplification rules.