[WIP] Resolver

This PR contains changes needed for https://github.com/CocoaPods/CocoaPods/pull/2637.