Narrow the return types to API types in tests.

This should drastically reduce the number of internal “hits” in plugins.
I'm all for using Organize Imports when it works. We can start doing that.

It would be very easy to add a save action as a stop-gap solution. One that is simply based on strings, ordering and removing duplicates. But I know most people will disagree with such an approach, so we need to fix refactorings first.