Get rid of the hand-crafted equivalence definition for QueryGraph

We moved out the pattern -> query graph lookup table into the context.

Enabling the proper QueryGraph equality exposed issues with how we handle
optional matches and WITH.