Support for specifying target of projects in specs

This pull request supersedes https://github.com/CocoaPods/CocoaPods/pull/1497

Sister pull: https://github.com/CocoaPods/Core/pull/158 (now that xcodeproj doesn't require the native extensions I'm wondering if it still make sense to keep CocoaPods and Core separated. /c @alloy)

--

###### Living TODO

- [ ] identify a solution for targets with dependencies and implement it
- [ ] cleanup and final refinements 
- [ ] tests

--

Credit to @pereckerdal for his terrific work!