DefaultCompositeExcludeTest.groovy

Optimize `equalsIgnoreArtifact` In some cases, calling `equalsIgnoreArtifact` may be extremely costly. This optimizes the algorithm for different cases:

1. the specs we compare actually do not exclude artifacts, in which case we can compare by equality 2. the specs we compare are in a different order, in which case we can avoid deep `equals` calls 3. the specs we compare are different, but some of them are equal and we should avoid considering them candidates again