[Resolver] Scope dependencies in #edge_is_valid_for_target? by the spec's consume for that target's platform

Closes https://github.com/CocoaPods/CocoaPods/issues/2778.
Follow-up to https://github.com/CocoaPods/CocoaPods/pull/2760.
Allows for https://github.com/CocoaPods/Core/compare/scope-dependencies-by-consumer.
This replaces the hack of `Dependency#from_subspec_dependency?`

\c @orta, @alloy, @neonichu