Add validation step for multiple variant selection This commit adds a graph validation step, which checks that if multiple variants of a single component are selected, they have compatible attributes.
Currently, compatible means _identical_. If we want to improve this further, next steps would be to do this during selection instead of validation, and potentially substitute one selected variant with the other when one is fully compatible with the other (in other words, all its common attributes are compatible with the other variant). This, however, would likely have a performance impact in selection.
Support requested capabilities on external dependencies This commit adds support for having requested capabilities part of the module component selector, for external dependencies. This means that if a component is using Gradle metadata, we can read requested capabilities and honor them during selection.
This reworks where requested capabilities are stored, and in particular moves them to the `ComponentSelector`, making them properly part of the identity of a dependency. As such, two dependencies requiring two different variants by using distinct capabilities will now properly appear as two different dependencies in the dependency graph, instead of two variants of the same dependency.