Fix bug in `clean_database` script
Fix bug in `clean_database` script

When we migrate data from production to another environment, sensitive
data is removed. This includes data about currently ongoing framework
applications (for frameworks that are `open`), such as draft services
and `supplier_frameworks` info.

Previously we were deleting `supplier_frameworks` data for frameworks
that were `pending` as well as `open`.

We were then removing suppliers who had no entry in the
`supplier_frameworks` table as well as no services (dangling suppliers).

Because `supplier_frameworks` info had been deleted for `pending` and
`open` frameworks but draft services only deleted for `open` frameworks,
this led to a foreign key constraint error on the `draft_services` table
when trying to delete suppliers with no `supplier_framework`.

This commit makes the function only delete `supplier_frameworks` for
`open` frameworks.

alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws