[Analyzer] Improve handling of different types of duplicate dependencies

Closes https://github.com/CocoaPods/CocoaPods/issues/2743.
Closes https://github.com/CocoaPods/CocoaPods/issues/2738.

@orta this might interfere with whatever `Podfile.local` stuff you're doing that you mentioned in https://github.com/CocoaPods/CocoaPods/issues/2672.

Example output when there are duplicate dependencies:
```
[!] There are duplicate dependencies on `AFNetworking` in `Podfile`:

- AFNetworking (~> 1.0)
- AFNetworking (~> 1.2)
```

Example output when two dependencies with the same root name have different external sources:
```
[!] There are multiple dependencies with different sources for `ARAnalytics` in `Podfile`:

- ARAnalytics/Flurry (from `https://github.com/orta/ARAnalytics.git`, tag `1.0`)
- ARAnalytics/GoogleAnalytics
```