[Frontend]: Write out .swiftdeps files atomically
[Frontend]: Write out .swiftdeps files atomically

Modify ReferenceDependenciesEmitter::emit to write to a temporary file and then atomically rename it in place using the atomicallyWritingToFile helper function.
This resolves SR-8707, where .swiftdeps files could be truncated if the compiler job was killed in the middle of a write.

stephentyrone/swift,airspeedswift/swift,hooman/swift,gregomni/swift,danielmartin/swift,apple/swift,apple/swift,xedin/swift,nathawes/swift,alblue/swift,jmgc/swift,jmgc/swift,karwa/swift,shahmishal/swift,lorentey/swift,shajrawi/swift,nathawes/swift,xwu/swift,alblue/swift,gregomni/swift,austinzheng/swift,benlangmuir/swift,xedin/swift,stephentyrone/swift,CodaFi/swift,JGiola/swift,jmgc/swift,aschwaighofer/swift,harlanhaskins/swift,shajrawi/swift,hooman/swift,karwa/swift,shajrawi/swift,shajrawi/swift,stephentyrone/swift,karwa/swift,rudkx/swift,sschiau/swift,roambotics/swift,hooman/swift,devincoughlin/swift,shahmishal/swift,sschiau/swift,tkremenek/swift,jmgc/swift,practicalswift/swift,gribozavr/swift,airspeedswift/swift,apple/swift,ahoppen/swift,stephentyrone/swift,lorentey/swift,danielmartin/swift,shahmishal/swift,practicalswift/swift,nathawes/swift,practicalswift/swift,practicalswift/swift,amraboelela/swift,austinzheng/swift,xwu/swift,allevato/swift,lorentey/swift,parkera/swift,devincoughlin/swift,glessard/swift,aschwaighofer/swift,benlangmuir/swift,roambotics/swift,amraboelela/swift,sschiau/swift,alblue/swift,apple/swift,atrick/swift,devincoughlin/swift,nathawes/swift,ahoppen/swift,parkera/swift,stephentyrone/swift,danielmartin/swift,tkremenek/swift,gribozavr/swift,JGiola/swift,aschwaighofer/swift,gribozavr/swift,xedin/swift,karwa/swift,brentdax/swift,brentdax/swift,jckarter/swift,stephentyrone/swift,amraboelela/swift,austinzheng/swift,harlanhaskins/swift,sschiau/swift,devincoughlin/swift,gribozavr/swift,lorentey/swift,jmgc/swift,xedin/swift,brentdax/swift,sschiau/swift,parkera/swift,xwu/swift,jckarter/swift,allevato/swift,alblue/swift,gregomni/swift,roambotics/swift,airspeedswift/swift,amraboelela/swift,stephentyrone/swift,glessard/swift,ahoppen/swift,jckarter/swift,alblue/swift,shahmishal/swift,allevato/swift,parkera/swift,karwa/swift,glessard/swift,practicalswift/swift,glessard/swift,benlangmuir/swift,parkera/swift,aschwaighofer/swift,brentdax/swift,JGiola/swift,benlangmuir/swift,alblue/swift,harlanhaskins/swift,JGiola/swift,atrick/swift,rudkx/swift,rudkx/swift,benlangmuir/swift,devincoughlin/swift,shahmishal/swift,apple/swift,xwu/swift,gribozavr/swift,shajrawi/swift,CodaFi/swift,danielmartin/swift,gregomni/swift,danielmartin/swift,atrick/swift,harlanhaskins/swift,gribozavr/swift,gribozavr/swift,sschiau/swift,austinzheng/swift,aschwaighofer/swift,amraboelela/swift,shahmishal/swift,karwa/swift,roambotics/swift,nathawes/swift,shajrawi/swift,glessard/swift,xedin/swift,jckarter/swift,airspeedswift/swift,nathawes/swift,tkremenek/swift,devincoughlin/swift,gregomni/swift,benlangmuir/swift,lorentey/swift,rudkx/swift,austinzheng/swift,shahmishal/swift,shahmishal/swift,brentdax/swift,jckarter/swift,tkremenek/swift,hooman/swift,atrick/swift,apple/swift,lorentey/swift,atrick/swift,rudkx/swift,parkera/swift,jckarter/swift,hooman/swift,austinzheng/swift,lorentey/swift,glessard/swift,amraboelela/swift,atrick/swift,airspeedswift/swift,xwu/swift,CodaFi/swift,shajrawi/swift,allevato/swift,CodaFi/swift,practicalswift/swift,hooman/swift,airspeedswift/swift,sschiau/swift,practicalswift/swift,devincoughlin/swift,shajrawi/swift,karwa/swift,practicalswift/swift,ahoppen/swift,sschiau/swift,danielmartin/swift,aschwaighofer/swift,brentdax/swift,harlanhaskins/swift,gribozavr/swift,alblue/swift,ahoppen/swift,parkera/swift,roambotics/swift,roambotics/swift,xedin/swift,rudkx/swift,lorentey/swift,harlanhaskins/swift,jmgc/swift,allevato/swift,tkremenek/swift,CodaFi/swift,CodaFi/swift,jmgc/swift,tkremenek/swift,JGiola/swift,hooman/swift,harlanhaskins/swift,parkera/swift,jckarter/swift,xedin/swift,allevato/swift,karwa/swift,amraboelela/swift,nathawes/swift,brentdax/swift,airspeedswift/swift,xedin/swift,ahoppen/swift,JGiola/swift,tkremenek/swift,xwu/swift,aschwaighofer/swift,xwu/swift,austinzheng/swift,CodaFi/swift,danielmartin/swift,devincoughlin/swift,gregomni/swift,allevato/swift