ThreadSafeDatabaseMetadata in doc is not compatible with inheritance
This is expected, if somewhat non-obvious. The whole purpose of using the `ThreadSafeDatabaseMetadata` is for when you plan to switch the database at run-time in a multi-threaded application, so the assumption is that at multiple points during runtime you will be explicitly binding the models to a database, e.g.:

```python

# BaseModel declares that it uses ThreadSafeDatabaseMetadata

class A(BaseModel):
    pass

class B(BaseModel):
    pass

master = PostgresqlDatabase(...)
replica = PostgresqlDatabase(...)

# Explicitly bind the models.
master.bind([A, B])
```

With that said, it *should* still inherit the "default" or original Meta.database, so I will put together a patch for this. b782657823a64fcdef6674cadccb2f2679933e6f
[ThreadSafeDatabaseMetadata in doc](http://docs.peewee-orm.com/en/latest/peewee/database.html#thread-safety-and-multiple-databases)
```python
import threading
from peewee import Metadata

class ThreadSafeDatabaseMetadata(Metadata):
    def __init__(self, *args, **kwargs):
        # database attribute is stored in a thread-local.
        self._local = threading.local()
        super(ThreadSafeDatabaseMetadata, self).__init__(*args, **kwargs)

    def _get_db(self):
        return getattr(self._local, 'database', self._database)
    def _set_db(self, db):
        self._local.database = self._database = db
    database = property(_get_db, _set_db)


class BaseModel(Model):
    class Meta:
        # Instruct peewee to use our thread-safe metadata implementation.
        model_metadata_class = ThreadSafeDatabaseMetadata
```

when you try to use a baseModel
```python
class BaseModel(Model):
    class Meta:
        database = db
        model_metadata_class = ThreadSafeDatabaseMetadata

class User(BaseModel):
    id = BigAutoField(primary_key=True)
```

`User._meta.database` will not correctly inherit `BaseMoel._meta.database` because User's meta_options init in this way.
```
            for k in base_meta.__dict__:
                if k in all_inheritable and k not in meta_options:
                    meta_options[k] = base_meta.__dict__[k]
```
where `database` is not in `base_meta.__dict__` but `_database`.
