Get bulk of tricky cases of graphOf function defined.

Also simplify termination proof a little.
Define a generic graph evaluation function.

Both the evalG in datadeps, and the merge_graphs relation are
instances of this new relation.