copy_tag_nolock(): fix write ordering and add a write_barrier()
copy_tag_nolock(): fix write ordering and add a write_barrier()

Fixes a rare crash in the parallel GC.

If we copy a closure non-atomically during GC, as we do for all
immutable values, then before writing the forwarding pointer we better
make sure that the closure itself is visible to other threads that
might follow the forwarding pointer.  I imagine this doesn't happen
very often, but I just found one case of it: in scavenge_stack, the
RET_FUN case, after evacuating ret_fun->fun we then follow it and look
up the info pointer.

anton-dessiatov/ghc,nushio3/ghc,ekmett/ghc,vTurbine/ghc,shlevy/ghc,ezyang/ghc,ilyasergey/GHC-XAppFix,green-haskell/ghc,TomMD/ghc,snoyberg/ghc,jstolarek/ghc,fmthoma/ghc,ml9951/ghc,mcmaniac/ghc,nathyong/microghc-ghc,mcschroeder/ghc,green-haskell/ghc,spacekitteh/smcghc,bitemyapp/ghc,ilyasergey/GHC-XAppFix,sdiehl/ghc,mfine/ghc,tibbe/ghc,vTurbine/ghc,mfine/ghc,sdiehl/ghc,oldmanmike/ghc,jstolarek/ghc,vikraman/ghc,frantisekfarka/ghc-dsi,da-x/ghc,siddhanathan/ghc,forked-upstream-packages-for-ghcjs/ghc,spacekitteh/smcghc,ghc-android/ghc,siddhanathan/ghc,anton-dessiatov/ghc,christiaanb/ghc,wxwxwwxxx/ghc,nkaretnikov/ghc,ezyang/ghc,ghc-android/ghc,nkaretnikov/ghc,ezyang/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,forked-upstream-packages-for-ghcjs/ghc,mettekou/ghc,snoyberg/ghc,bitemyapp/ghc,elieux/ghc,mcmaniac/ghc,holzensp/ghc,TomMD/ghc,ryantm/ghc,da-x/ghc,tjakway/ghcjvm,ml9951/ghc,nkaretnikov/ghc,sdiehl/ghc,da-x/ghc,ghc-android/ghc,elieux/ghc,olsner/ghc,acowley/ghc,vTurbine/ghc,wxwxwwxxx/ghc,acowley/ghc,bitemyapp/ghc,christiaanb/ghc,nkaretnikov/ghc,gcampax/ghc,nathyong/microghc-ghc,vikraman/ghc,AlexanderPankiv/ghc,urbanslug/ghc,urbanslug/ghc,sdiehl/ghc,snoyberg/ghc,mettekou/ghc,elieux/ghc,mfine/ghc,christiaanb/ghc,ml9951/ghc,olsner/ghc,mfine/ghc,lukexi/ghc,gcampax/ghc,mcschroeder/ghc,acowley/ghc,siddhanathan/ghc,urbanslug/ghc,siddhanathan/ghc,ryantm/ghc,bitemyapp/ghc,elieux/ghc,oldmanmike/ghc,olsner/ghc,holzensp/ghc,forked-upstream-packages-for-ghcjs/ghc,GaloisInc/halvm-ghc,urbanslug/ghc,sgillespie/ghc,urbanslug/ghc,tjakway/ghcjvm,lukexi/ghc-7.8-arm64,mcschroeder/ghc,da-x/ghc,fmthoma/ghc,gcampax/ghc,sgillespie/ghc,vikraman/ghc,green-haskell/ghc,forked-upstream-packages-for-ghcjs/ghc,hferreiro/replay,nathyong/microghc-ghc,wxwxwwxxx/ghc,ekmett/ghc,tjakway/ghcjvm,vikraman/ghc,olsner/ghc,mfine/ghc,AlexanderPankiv/ghc,acowley/ghc,TomMD/ghc,sgillespie/ghc,tibbe/ghc,ml9951/ghc,nkaretnikov/ghc,mettekou/ghc,mettekou/ghc,da-x/ghc,nomeata/ghc,bitemyapp/ghc,fmthoma/ghc,ghc-android/ghc,tjakway/ghcjvm,oldmanmike/ghc,nushio3/ghc,ml9951/ghc,gridaphobe/ghc,snoyberg/ghc,ezyang/ghc,mettekou/ghc,lukexi/ghc,anton-dessiatov/ghc,lukexi/ghc,fmthoma/ghc,mcschroeder/ghc,nomeata/ghc,siddhanathan/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,ekmett/ghc,ryantm/ghc,holzensp/ghc,elieux/ghc,fmthoma/ghc,nushio3/ghc,green-haskell/ghc,anton-dessiatov/ghc,nathyong/microghc-ghc,mettekou/ghc,nomeata/ghc,olsner/ghc,frantisekfarka/ghc-dsi,da-x/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,gcampax/ghc,TomMD/ghc,vikraman/ghc,acowley/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,mettekou/ghc,shlevy/ghc,wxwxwwxxx/ghc,AlexanderPankiv/ghc,AlexanderPankiv/ghc,ml9951/ghc,mcmaniac/ghc,acowley/ghc,gridaphobe/ghc,tjakway/ghcjvm,vTurbine/ghc,nomeata/ghc,elieux/ghc,ghc-android/ghc,oldmanmike/ghc,ryantm/ghc,gridaphobe/ghc,holzensp/ghc,sdiehl/ghc,wxwxwwxxx/ghc,ezyang/ghc,gcampax/ghc,ghc-android/ghc,green-haskell/ghc,nushio3/ghc,sgillespie/ghc,christiaanb/ghc,wxwxwwxxx/ghc,hferreiro/replay,mcmaniac/ghc,lukexi/ghc,gcampax/ghc,gridaphobe/ghc,lukexi/ghc-7.8-arm64,hferreiro/replay,nushio3/ghc,christiaanb/ghc,forked-upstream-packages-for-ghcjs/ghc,snoyberg/ghc,gridaphobe/ghc,siddhanathan/ghc,oldmanmike/ghc,olsner/ghc,ilyasergey/GHC-XAppFix,vikraman/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,mfine/ghc,vTurbine/ghc,frantisekfarka/ghc-dsi,vTurbine/ghc,shlevy/ghc,mcmaniac/ghc,ghc-android/ghc,nathyong/microghc-ghc,spacekitteh/smcghc,shlevy/ghc,TomMD/ghc,ekmett/ghc,AlexanderPankiv/ghc,elieux/ghc,sdiehl/ghc,siddhanathan/ghc,tibbe/ghc,anton-dessiatov/ghc,ml9951/ghc,nushio3/ghc,ekmett/ghc,gcampax/ghc,lukexi/ghc,sgillespie/ghc,acowley/ghc,spacekitteh/smcghc,sgillespie/ghc,nushio3/ghc,mcschroeder/ghc,vikraman/ghc,shlevy/ghc,jstolarek/ghc,vTurbine/ghc,lukexi/ghc-7.8-arm64,hferreiro/replay,anton-dessiatov/ghc,nkaretnikov/ghc,olsner/ghc,nkaretnikov/ghc,tibbe/ghc,lukexi/ghc-7.8-arm64,sdiehl/ghc,frantisekfarka/ghc-dsi,ilyasergey/GHC-XAppFix,tjakway/ghcjvm,christiaanb/ghc,GaloisInc/halvm-ghc,jstolarek/ghc,tjakway/ghcjvm,ryantm/ghc,forked-upstream-packages-for-ghcjs/ghc,jstolarek/ghc,gridaphobe/ghc,hferreiro/replay,anton-dessiatov/ghc,oldmanmike/ghc,urbanslug/ghc,nomeata/ghc,hferreiro/replay,tibbe/ghc,gridaphobe/ghc,mcschroeder/ghc,da-x/ghc,fmthoma/ghc,TomMD/ghc,snoyberg/ghc,ml9951/ghc,AlexanderPankiv/ghc,urbanslug/ghc,ezyang/ghc,shlevy/ghc,TomMD/ghc,wxwxwwxxx/ghc,nathyong/microghc-ghc,spacekitteh/smcghc,frantisekfarka/ghc-dsi,GaloisInc/halvm-ghc,hferreiro/replay,lukexi/ghc-7.8-arm64,christiaanb/ghc,holzensp/ghc,ezyang/ghc,shlevy/ghc,mfine/ghc,mcschroeder/ghc