Add a test case demonstrating the problem.
Remap aggregate columns inside subqueries.
Track subquery stack so can distinguish tables introduced by them.
Now get expected result.
merge MMcM: Improve handling of subqueries in an aggregate query

Merge pull request #1028 from MMcM/sql-layer/sql-subquery-with-group-by-column
https://github.com/FoundationDB/sql-layer/pull/1028