tests: add test for rebasing merges with ancestors of the rebase destination
This shows sub-optimal behaviour. The user gets a merge prompt that it is very
hard to justify.
merge: 0 is a valid ancestor different from None
Most internal functions can take either a hash or an integer. Merge did however
not handle 0 as revision 0. Now it does.