Removes QueryPlan and moves the solved PatternQuery to LogicalPlan