[NFC][SPIRV] Refactor emitGlobalDI to use helpers and store CompileUnitRegMap
This commit refactors emitGlobalDI() to use the extracted helper
functions and adds CompileUnitRegMap to store DebugCompilationUnit
registers for later lookup by function-level debug info emission.
This prepares for function-level debug info emission which needs
to look up compile units.