merge: use ancestor filename from planning phase instead of filectx ancestor

test-merge-types.t changes a bit in flag merging. It relied on the
implementation detail that 100% identical revlog entries are reused. The revlog
reuse did that fctx.ancestor() saw an ancestor where there really not was one.
pull: move return code in the pull operation object

With bundle2 we'll have multiple code path susceptible to be responsible for
adding changeset during the pull. We move it to the pull operation to simplify
this the coming logic. The one doing the adding the changegroup will set the
value.
pull: move the cgresult logic in _pullchangeset

Logical follow up of the previous changeset. The `_pullchangeset` is now
responsible of setting the `pullop.cgresult`.
pull: put discovery step in its own function

The discovery is a full step that will grow to contain more than changesets. We
set it in its own function like all other steps.
pull: add a set of steps that remain to be done during the pull

With bundle2 we'll slowly move current steps into a single bundle2 building and
call (changegroup, phases, obsmarkers, bookmarks). But we need to keep the
old methods around for servers that do not support bundle2. So we introduce
this set of steps that remains to be done.