Separate header paths for different targets in .xcconfig files

Supersedes #2571
Fixes #904