This starts storing information in mergestate about files which were
automatically merged and the other/remote version of file was used.
We need this information at commit to pick the filenode parent for the new
commit. The commit code has weird filenode resolution here which does not depend
on what merge did and rely on some file ancestry logic. That leads to problem in
some cases, the tests which are changed by this patch.
Somethings which can be further investigated are:
1) refactoring of commit logic more to depend on this information
2) maybe a more generic solution?