**Describe the bug**

Can't rename distributed table and move it from Ordinary to Atomic database

**How to reproduce**

```
CREATE DATABASE atomic_database ON CLUSTER cluster_name ENGINE = Atomic
```
```
CREATE DATABASE ordinary_database ON CLUSTER cluster_name ENGINE = Ordinary
```

```
CREATE TABLE ordinary_database.t ON CLUSTER cluster_name
...
ENGINE = ReplicatedMergeTree(...)
...
```

```
CREATE TABLE ordinary_database.distributed_table ON CLUSTER cluster_name AS ordinary_database.t 
ENGINE = Distributed(cluster_name, ordinary_database, t)
```

```
RENAME TABLE ordinary_database.distributed_table TO atomic_database.distributed_table

Query id: 7bd2101e-f78a-4584-8374-6e44a0bbf23f


0 rows in set. Elapsed: 0.011 sec.

Received exception from server (version 21.5.6):
Code: 1000. DB::Exception: Received from clickhouse-server:9000. DB::Exception: File not found: /var/lib/clickhouse/data/ordinary_database/distributed_table.
```
But 
```
ls -lh /var/lib/clickhouse/data/ordinary_database
total 0
drwxr-x---  2 ...  staff    64B Jun  4 18:19 distributed_table
drwxr-x---  4 ...  staff   128B Jun  4 18:18 t
```

**Does it reproduce on recent release?**
Checked on 21.5.6.6 version


**Expected behavior**

For example, renaming _Views_ works perfectly. I expect the same from the _Distributed_ table

"sharding key expression (optional), "
                "policy to store data in (optional).",
                ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
        String cluster_name = getClusterNameAndMakeLiteral(engine_args[0]);
        engine_args[1] = evaluateConstantExpressionOrIdentifierAsLiteral(engine_args[1], args.getLocalContext());
        engine_args[2] = evaluateConstantExpressionOrIdentifierAsLiteral(engine_args[2], args.getLocalContext());
        String remote_database = engine_args[1]->as<ASTLiteral &>().value.safeGet<String>();
        String remote_table = engine_args[2]->as<ASTLiteral &>().value.safeGet<String>();
        const auto & sharding_key = engine_args.size() >= 4 ? engine_args[3] : nullptr;
        const auto & storage_policy = engine_args.size() >= 5 ? engine_args[4]->as<ASTLiteral &>().value.safeGet<String>() : "default";
        
        if (sharding_key)
        {
            auto sharding_expr = buildShardingKeyExpression(sharding_key, args.getContext(), args.columns.getAllPhysical(), true);
            const Block & block = sharding_expr->getSampleBlock();
            if (block.columns() != 1)
                throw Exception("Sharding expression must return exactly one column", ErrorCodes::INCORRECT_NUMBER_OF_COLUMNS);
            auto type = block.getByPosition(0).type;
            if (!type->isValueRepresentedByInteger())
                throw Exception("Sharding expression has type " + type->getName() +
                    ", but should be one of integer type", ErrorCodes::TYPE_MISMATCH);
        }
        
        DistributedSettings distributed_settings;
        if (args.storage_def->settings)
        {
            distributed_settings.loadFromQuery(*args.storage_def);
        }
        if (distributed_settings.max_delay_to_insert < 1)
            throw Exception(ErrorCodes::ARGUMENT_OUT_OF_BOUND,