**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 │
└─────────────────────────────────┘

```

query_info.input_order_info = query_info.order_optimizer->getInputOrder(metadata_snapshot, *context);
        }
        StreamLocalLimits limits;
        SizeLimits leaf_limits;
        std::shared_ptr<const EnabledQuota> quota;
        
        if (!options.ignore_limits)
        {
            limits = getLimitsForStorage(settings, options);
            leaf_limits = SizeLimits(settings.max_rows_to_read_leaf, settings.max_bytes_to_read_leaf,
                                          settings.read_overflow_mode_leaf);
        }
        if (!options.ignore_quota && (options.to_stage == QueryProcessingStage::Complete))
            quota = context->getQuota();
        storage->read(query_plan, required_columns, metadata_snapshot,
                      query_info, *context, processing_stage, max_block_size, max_streams);
        if (context->hasQueryContext() && !options.is_internal)
        {
            auto local_storage_id = storage->getStorageID();
            context->getQueryContext().addQueryAccessInfo(
                backQuoteIfNeed(local_storage_id.getDatabaseName()), local_storage_id.getFullTableName(), required_columns);
        }
        
        if (!query_plan.isInitialized())
        {
            auto header = metadata_snapshot->getSampleBlockForColumns(
                    required_columns, storage->getVirtuals(), storage->getStorageID());
            addEmptySourceToQueryPlan(query_plan, header, query_info);
        }