Update provided interfaces when migrating objects to new class.

Currently, when migrating classes in upgrade steps using the `migrate_class` helper the `__provides__` cache is not updated, resulting in wrong interfaces.

This PR adds resetting the cache using `directlyProvides`.

/ @maethu