Add guards for unsupported subqueries join plan, optimize the possible subqueriese

These test queries would be easier to understand and compare and verify if they used a consistent style of line wrapping, and indentation/spacing inside and outside the query string(s).