Move graph_subst tests to new test graph type

Also: hopefully easier to write now.  Just have to provide the LHS and
RHS of the rule, the target and the expected result.