Rebase: Check commit ancestry using git

The thing we don't support in this handler is rebasing a change onto a
descendant (which would require more work to reorder the commits).
This descendant check is easily done from the git repository, rather
than using a custom implementation based on PatchSetAncestors (which
may be inaccurate anyway).

Add Repository and RevWalk arguments to the relevant method in
RebaseChange, so we can reuse the same instances we used for the
isMergedInto call.

Change-Id: I4741174dc37d00e803aafb2aceef0ffe233b5132
2 files changed