caos.backends.pgsql: Fix out of order processing of subqueries
caos.backends.pgsql: Fix out of order processing of subqueries

Make sure to process subquery outer bonds only when both sides have been
processed, rather than assuming that the outer ref has been processed
before the subquery.  This fixes crashes on plans where the subquery
appeared before its outer reference.

edgedb/edgedb,edgedb/edgedb,edgedb/edgedb