Revert the push down limit feature with aggregate on non-partition colum...

...n and order by
This looks fragile to me--- if you had orderby->project->project->agg then this condition would fail, but I think you would want it to pass.  Why not walk up the plan, skipping project nodes until you find an order by?