After upgrade CH from 20.8 to 21.3 I noticed RAM used by dictionary with `hashed` layout was increased exactly in **4** times.

OS: Ubuntu 20.04
Processor: AMD EPYC 7502P 32-Core Processor
RAM: 252 GB

`<dictionaries_lazy_load>false</dictionaries_lazy_load>
`

In 20.8 release CH was using less memory for dictionaries with `hashed` layout.
The problem was not detected for dictionaries with `ComplexKeyHashed` layout. But they have a small amount of data (up to 500 MB).
After server restart with 20.8 version memory usage is increasing up to 30 GB (all dictionaries RAM usage) step by step during dictionaries loading.
After server restart with 21.3 version memory usage is increasing up to 112 GB almost immediately and then decreasing to 91 GB.

Maybe it's a consequence after #18236

20.8 version dictionary
```
┌─status─┬─type───┬─key────┬─attribute.types─┬─element_count─┬─formatReadableSize(bytes_allocated)─┐
│ LOADED │ Hashed │ UInt64 │ ['Float64']     │     428492347 │ 16.00 GiB                           │
└────────┴────────┴────────┴─────────────────┴───────────────┴─────────────────────────────────────┘
```

21.3 version dictionary
```
┌─status─┬─type───┬─key────┬─attribute.types─┬─element_count─┬─formatReadableSize(bytes_allocated)─┐
│ LOADED │ Hashed │ UInt64 │ ['Float64']     │     428492347 │ 64.00 GiB                           │
└────────┴────────┴────────┴─────────────────┴───────────────┴─────────────────────────────────────┘
```

Dictionaries with the same scheme but another amount of data also have this problem.
{
        auto stream = source_ptr->loadUpdatedAll();
        stream->readPrefix();
        while (Block block = stream->read())
        {
            const auto & saved_id_column = *saved_block->safeGetByPosition(0).column;
            const auto & update_id_column = *block.safeGetByPosition(0).column;
            std::unordered_map<Key, std::vector<size_t>> update_ids;
            for (size_t row = 0; row < update_id_column.size(); ++row)
            {
                const auto id = update_id_column.get64(row);
                update_ids[id].push_back(row);
            }
            const size_t saved_rows = saved_id_column.size();
            IColumn::Filter filter(saved_rows);
            std::unordered_map<Key, std::vector<size_t>>::iterator it;
            for (size_t row = 0; row < saved_id_column.size(); ++row)
            {
                auto id = saved_id_column.get64(row);
                it = update_ids.find(id);
                if (it != update_ids.end())
                    filter[row] = 0;
                else
                    filter[row] = 1;
            }
            auto block_columns = block.mutateColumns();
            for (const auto attribute_idx : ext::range(0, attributes.size() + 1))
            {
                auto & column = saved_block->safeGetByPosition(attribute_idx).column;
                const auto & filtered_column = column->filter(filter, -1);