Some minor improvements to the thread safety intermediate language -- mostly const correctness and reformatting. Fixes the types involved with castOpcode().
CodeGen: Move PGO initialization into Release()

Emitting the PGO initialization in EmitGlobalFunctionDefinition is
inefficient, since this only has an effect once per module.  We move
this to Release() with the rest of the once-per-module logic.