Join promotion retry

A try for complete rewrite of join promotion logic for .filter() clauses.

See ticket #21376 for details.