Make sure supertypes are unique

`array_flip` followed by `array_keys` is much quicker than `array_unique`. We don't retain he array indices by doing this, but we don't need them in this case so can take advantage of the optimisation. Making the supertypes array unique reduces the amount of classes that DI has to work through.