Reduced code duplication for Build Phase accessors

The implementations of those methods have been very similar.
As we have dropped the support for Xcode 4.2, we probably don't need the workaround for `headers_build_phase` anymore. (cocoapods/cocoapods#13)