Walk only as far as the common ancestors of uninteresting commits

This is about the fifth attempt at this, and eventually I just copied the logic which @peff described, which made everything work.

This is still slower than git, but  a lot better than what we currently do. Here's some tabular data on doing

    git rev-list --count v2.1.0 ^v2.0.0

which are 957 commits. The libgit2 benchmarks are from a tiny program that does the same job.

master | this | git
----------|--------|----
0.635 | 0.076 | 0.046