make semi-joins to work with nested joins

Description

merge (or reimplement) 5.6 optimizations related to semi-joins and nested joins

Environment

None

Status

Assignee

Unassigned

Reporter

Sergei Golubchik

Labels

None

External issue ID

None

External issue ID

None

Priority

Critical