Handle subqueries in FROM clause in FQS planning.
For every such subquery, we find out the datanodes where the query should be
executed and type of distribution of the result (replicated/distributed) using
the distribution information of relations participating in the query. This
process is carried out recursively, in case the relations participating in the
query, are in turn subqueries. If the result is distributed, we also maintain
the list of Var nodes on which the result is distributed.
The distribution information of result of a subquery is then treated in the same
way as the distribution information of a table to derive the distribution
information of the result of the whole query (of which the subqueries are part).