[WIP] Resolver

Closes https://github.com/CocoaPods/CocoaPods/issues/978, https://github.com/CocoaPods/CocoaPods/issues/1489, https://github.com/CocoaPods/CocoaPods/issues/2002, https://github.com/CocoaPods/CocoaPods/issues/2318, https://github.com/CocoaPods/CocoaPods/issues/2506.

Depends upon changes in https://github.com/CocoaPods/Core/pull/186.

~~This branch is very much a work in progress, but I wanted to give us a place to discuss the final steps of integrating [the resolver](https://github.com/CocoaPods/Resolver) back into CocoaPods. To just test out the dependency resolution process, without having to `pod install` a million times, I recommend https://github.com/segiddins/cocoapods-dependencies (it even has an `--ignore-lockfile` option).~~

~~This PR won't be merged for a while, so I welcome any and all feedback.~~

---

Examples of improvement in this PR:

Podfile:
```ruby
platform :ios, "7.0"
inhibit_all_warnings!
pod 'RestKit'
pod 'AFNetworking', '~> 1.2.0'
```
`master`:
```
[!] Unable to satisfy the following requirements:

- `AFNetworking (~> 1.3.0)` required by `RestKit/Network (0.23.3)`
- `AFNetworking (~> 1.2.0)` required by `Podfile`
```
`resolver`:
```yaml
---
- AFNetworking (1.2.1)
- RestKit (0.20.1):
  - RestKit/Core
- RestKit/Core (0.20.1):
  - RestKit/CoreData
  - RestKit/Network
  - RestKit/ObjectMapping
- RestKit/CoreData (0.20.1)
- RestKit/Network (0.20.1):
  - AFNetworking (~> 1.2.0)
  - RestKit/ObjectMapping
  - RestKit/Support
  - SOCKit
- RestKit/ObjectMapping (0.20.1)
- RestKit/Support (0.20.1):
  - TransitionKit (= 1.1.0)
- SOCKit (1.1)
- TransitionKit (1.1.0)
```


Podfile:
```ruby
platform :ios, "7.0"
inhibit_all_warnings!
pod 'RestKit'
pod 'AFAmazonS3Client'
pod 'CargoBay'
pod 'AFOAuth2Client'
```
`master`:
```
[!] Unable to satisfy the following requirements:

- `AFNetworking (~> 1.3.0)` required by `RestKit/Network (0.23.3)`
- `AFNetworking (~> 1.2.0)` required by `Podfile`
```
`resolver`:
```yaml
---
- AFAmazonS3Client (1.0.1):
  - AFNetworking (~> 1.3)
- AFNetworking (1.3.4)
- AFOAuth2Client (0.1.2):
  - AFNetworking (~> 1.3)
- CargoBay (1.0.0):
  - AFNetworking (~> 1.0)
- ISO8601DateFormatterValueTransformer (0.6.0):
  - RKValueTransformers (~> 1.1.0)
- RKValueTransformers (1.1.0)
- RestKit (0.23.3):
  - RestKit/Core
- RestKit/Core (0.23.3):
  - RestKit/CoreData
  - RestKit/Network
  - RestKit/ObjectMapping
- RestKit/CoreData (0.23.3):
  - RestKit/ObjectMapping
- RestKit/Network (0.23.3):
  - AFNetworking (~> 1.3.0)
  - RestKit/ObjectMapping
  - RestKit/Support
  - SOCKit
- RestKit/ObjectMapping (0.23.3):
  - ISO8601DateFormatterValueTransformer (~> 0.6.0)
  - RKValueTransformers (~> 1.1.0)
  - RestKit/Support
- RestKit/Support (0.23.3):
  - TransitionKit (= 2.1.0)
- SOCKit (1.1)
- TransitionKit (2.1.0)
```

Podfile:
```ruby
platform :ios, "7.0"
inhibit_all_warnings!
pod 'AFAmazonS3Client'
pod 'CargoBay'
pod 'AFOAuth2Client'
```
`master`:
```
[!] Unable to satisfy the following requirements:

- `AFNetworking (~> 2.0)` required by `AFAmazonS3Client (2.0.0)`
- `AFNetworking/Serialization` required by `AFNetworking (2.4.1)`
- `AFNetworking/Security` required by `AFNetworking (2.4.1)`
- `AFNetworking/Reachability` required by `AFNetworking (2.4.1)`
- `AFNetworking/NSURLConnection` required by `AFNetworking (2.4.1)`
- `AFNetworking/NSURLSession` required by `AFNetworking (2.4.1)`
- `AFNetworking/UIKit` required by `AFNetworking (2.4.1)`
- `AFNetworking/Serialization` required by `AFNetworking/NSURLConnection (2.4.1)`
- `AFNetworking/Reachability` required by `AFNetworking/NSURLConnection (2.4.1)`
- `AFNetworking/Security` required by `AFNetworking/NSURLConnection (2.4.1)`
- `AFNetworking/Serialization` required by `AFNetworking/NSURLSession (2.4.1)`
- `AFNetworking/Reachability` required by `AFNetworking/NSURLSession (2.4.1)`
- `AFNetworking/Security` required by `AFNetworking/NSURLSession (2.4.1)`
- `AFNetworking/NSURLConnection` required by `AFNetworking/UIKit (2.4.1)`
- `AFNetworking/NSURLSession` required by `AFNetworking/UIKit (2.4.1)`
- `AFNetworking (~> 2.2)` required by `CargoBay (2.1.0)`
- `AFNetworking (~> 1.3)` required by `AFOAuth2Client (0.1.2)`
```
`resolver`:
```yml
---
- AFAmazonS3Client (1.0.1):
  - AFNetworking (~> 1.3)
- AFNetworking (1.3.4)
- AFOAuth2Client (0.1.2):
  - AFNetworking (~> 1.3)
- CargoBay (1.0.0):
  - AFNetworking (~> 1.0)
```

---

Major (non-code) holdups:
- [x] Name for resolver gem ([Molinillo](https://github.com/CocoaPods/Resolver/issues/5))
- [x] Launch version for resolver gem (`0.1.0`)
- [x] Specs for conflict Podfiles that we now support
- [ ] Performance torture testing
- [x] More complete documentation
- [x] Analyzer specs for handling implicitly locked dependencies (https://github.com/CocoaPods/CocoaPods/issues/2318)
- [x] Fine tuning UI hooks in the resolver to output what we want
- [x] Code review of the resolver gem itself (https://github.com/CocoaPods/Resolver/pull/2)
- [ ] Fix existing specs with circular dependencies (https://github.com/CocoaPods/Resolver/issues/6)
- [ ] Have a 2nd Core team member comfortable with the inner workings of this PR and Molinillo
You can use `sort_by(&:name)` here. I think I said this previously somewhere and you were concerned with performance, but that doesn’t seem to be an issue:

```
$ irb -r benchmark
irb(main):001:0> list = ('a'..'z').to_a.shuffle
=> ["w", "r", "y", "i", "k", "t", "h", "a", "m", "f", "q", "n", "b", "o", "u", "j", "d", "z", "x", "s", "e", "v", "l", "g", "c", "p"]
irb(main):002:0> n = 50000
=> 50000
irb(main):003:0> Benchmark.bm(7) do |x|
irb(main):004:1*   x.report('sort') { n.times { list.sort { |y,z| y.to_s <=> z.to_s } } }
irb(main):005:1>   x.report('sort_by') { n.times { list.sort_by(&:to_s) } }
irb(main):006:1> end
              user     system      total        real
sort      1.310000   0.000000   1.310000 (  1.313792)
sort_by   0.750000   0.070000   0.820000 (  0.821903)
```