[Spec::Linter] Improve frameworks validation logic

Closes https://github.com/CocoaPods/Core/issues/105