[Analyzer][Resolver] Implement more complete dependency locking

Tis should now behave more like Bundler
[RuboCop] Yield to the style guide, even though I disagree with it in some cases.
Merge pull request #2699 from CocoaPods/resolver-locking-dependencies

[Analyzer][Resolver] Implement more complete dependency locking