[Refactor] Extract XCConfigHelper.add_settings_for_file_accessors_of_target

Contains the duplicated logic from AggregateXCConfig#generate and PublicPodXCConfig#generate.