Foundation: move NSPipe and NSFileHandle to maccore, and fix it in the process