Fixed #23415 -- Add fields for unmanaged and proxy model migrations

Ticket: https://code.djangoproject.com/ticket/23415
consider making:
```
models = chain(
    sorted(added_models, key=self.swappable_first_key, reverse=True),
    ...
)
for app_label, model_name in models:
    ...
```
a separate line for better readability