graphmod: correctly emit nodes with more than 2 predecessors
The grandparent() function was returning only the closest predecessor of a
missing parent while it must return all of them to display a correct ancestry
graph.
$ hg init t
$ cd t
$ echo a > a
$ hg add a
$ hg commit -m test
$ rm .hg/requires
$ hg tip
abort: index 00changelog.i unknown format 2!
[255]
$ echo indoor-pool > .hg/requires
$ hg tip
abort: requirement 'indoor-pool' not supported!
[255]