Eng 6695 partial agg for ordered subquery

This test is in the wrong place, forcing you to copy code.
The test should be outside the loop -- if subquery search is disabled and _this_ (scan) node isSubQuery, then ignore its children (don't iterate over them). That's 1 or 2 lines of code.

Aside from being too complicated, this version of the code would cause a nestloop join with an outer subquery scan to skip its inner child tree entirely (because of the break) if subquery search is disabled. That may work out OK if we are just looking for aggs (assuming we never push an agg down below a join) but it would break if we tried to use it to find scan types with subquery search disabled.