ancestors: extract candidates function as commonancestorsheads
parsers: introduce index_commonancestorsheads

This is an exact copy of index_ancestors but without the final "deepest"
pruning.
parsers: remove unnecessary gca variable in index_commonancestorsheads
revlog: introduce commonancestorsheads method

Very similar to commonancestors but giving all the common ancestors heads.
backout: use commonancestorsheads for checking linear heritage

If two revisions are linearly related, there will only be one ancestor, and
commonancestors and commonancestorsheads would give the same result.
commonancestorsheads is however slightly simpler, faster and more correct.
localrepo: use commonancestorsheads for checking linear heritage in file commit

If two revisions are linearly related, there will only be one ancestor, and
commonancestors and commonancestorsheads would give the same result.
commonancestorsheads is however slightly simpler, faster and more correct.
revlog: backout 514d32de6646 - commonancestors
cmdutil: changed _makegraphlogrevset to _makelogrevset

This method will now be used to build both graphlog and log revset after this
series of patches.
largefiles: added test coverage for graph log

[Mads Kiilerich placed this patch before the patch that makes graphlog actually
work correctly for largefiles. As it is introduced here it just adds test
coverage and the actual bugfix patch will show the actual change.]
largefiles: changed overridelog to work with graphlog

Log for largefiles was failing for graph log since it was overriding match
instead of matchandpats.

[Mads Kiilerich modified this patch to address his review comments and ended up
rewriting/removing most of it.]