sql: support subquery
Step 1: support subquery binding in binder.
Existing binder can only bind columns and tables in the catalog.
One possbile solution is to add new types of column and table bindings: SubqueryColumnRef and SubQueryTableRef.
Step 2: support uncorrlated subquery execution.
Step 3: support subquery execution plan for correlated subquery.
Reference: https://ericfu.me/subquery-optimization/
@skyzh @wangrunji0408
Step 1 is done in #756. Now we support subqueries in FROM clause which can pass TPC-H Q9 #761.
However, TPC-H Q7 still fails because it has one table being joined with itself. The binder will generate the same ColumnRefId for both sides, which actually refer to different subqueries. A possible solution is to decouple ColumnRefId from physical tables, instead generate a temporary table ID for each occurrence.