**Describe the bug**
It's possible to rewrite CROSS JOIN TO INNER JOIN in certain conditions, but clickhouse doesn't do that when we have ```AND (cond OR cond)``` in WHERE clause.

**Does it reproduce on recent release?**
Yes

**How to reproduce**
Clickhouse version 21.2

```
EXPLAIN SYNTAX
WITH tbl AS
    (
        SELECT *
        FROM numbers(1000)
    )
SELECT count(x.number)
FROM tbl AS x
, tbl AS z
WHERE x.number = z.number

Query id: ea50c6a4-618d-4f87-a089-01ef2ba956fe

┌─explain──────────────────────────────────────┐
│ WITH tbl AS                                  │
│     (                                        │
│         SELECT *                             │
│         FROM numbers(1000)                   │
│     )                                        │
│ SELECT count(number)                         │
│ FROM tbl AS x                                │
│ ALL INNER JOIN tbl AS z ON number = z.number │
│ WHERE number = z.number                      │
└──────────────────────────────────────────────┘


EXPLAIN SYNTAX
WITH tbl AS
    (
        SELECT *
        FROM numbers(1000)
    )
SELECT count(x.number)
FROM tbl AS x
, tbl AS z
WHERE (x.number = z.number) AND ((x.number = 1) OR (x.number = 2))

Query id: 4f3f6e5a-f7fc-41c0-a2f2-675525e5d63e

┌─explain──────────────────────────────────────────────────────┐
│ WITH tbl AS                                                  │
│     (                                                        │
│         SELECT *                                             │
│         FROM numbers(1000)                                   │
│     )                                                        │
│ SELECT count(number)                                         │
│ FROM tbl AS x                                                │
│ CROSS JOIN tbl AS z                                          │
│ WHERE (number = z.number) AND ((number = 1) OR (number = 2)) │
└──────────────────────────────────────────────────────────────┘


EXPLAIN SYNTAX
WITH tbl AS
    (
        SELECT *
        FROM numbers(1000)
    )
SELECT count(x.number)
FROM tbl AS x
, tbl AS z
WHERE (x.number = z.number) AND 1

Query id: 3ba0c863-8432-441a-b04c-e06047436cbc

┌─explain─────────────────────────┐
│ WITH tbl AS                     │
│     (                           │
│         SELECT *                │
│         FROM numbers(1000)      │
│     )                           │
│ SELECT count(number)            │
│ FROM tbl AS x                   │
│ CROSS JOIN tbl AS z             │
│ WHERE (number = z.number) AND 1 │
└─────────────────────────────────┘

```

}
                required_columns_after_prewhere_set
                    = ext::map<NameSet>(required_columns_after_prewhere, [](const auto & it) { return it.name; });
            }
            auto syntax_result = TreeRewriter(*context).analyze(required_columns_all_expr, required_columns_after_prewhere, storage, metadata_snapshot);
            alias_actions = ExpressionAnalyzer(required_columns_all_expr, syntax_result, *context).getActionsDAG(true);
            
            required_columns = alias_actions->getRequiredColumns().getNames();
            
            if (prewhere_info && prewhere_info->remove_prewhere_column)
                if (required_columns.end()
                    != std::find(required_columns.begin(), required_columns.end(), prewhere_info->prewhere_column_name))
                    prewhere_info->remove_prewhere_column = false;
            
            required_columns.erase(std::remove_if(required_columns.begin(), required_columns.end(), [&](const String & name)
            {
                return required_columns_after_prewhere_set.count(name) != 0;
            }), required_columns.end());
            if (prewhere_info)
            {
                
                for (const auto & name : required_columns)
                    prewhere_info->prewhere_actions->tryRestoreColumn(name);
                auto analyzed_result
                    = TreeRewriter(*context).analyze(required_columns_from_prewhere_expr, metadata_snapshot->getColumns().getAllPhysical());
                prewhere_info->alias_actions
                    = ExpressionAnalyzer(required_columns_from_prewhere_expr, analyzed_result, *context).getActionsDAG(true, false);
                
                auto required_columns_from_alias = prewhere_info->alias_actions->getRequiredColumns();
                Block prewhere_actions_result = prewhere_info->prewhere_actions->getResultColumns();