Fix row number optimizations for unreferenced outputs

Channels referenced in partition by or orderby clauses of RowNumberLimit and TopNRowNumber nodes are pruned if they are not referenced. Fix this in the PruneUnreferencedOutputs optimizer so that these channels are carried forward.