This patch moves the emission of global variables from DwarfDebug::beginModule()
to DwarfDebug::endModule(). Effectively, this changes nothing but the order
of debug entities in the resulting DWARF.
This is needed to simplify DWARF emission in a context of proper support of
function-local static variables (which are globals in terms of LLVM IR)
which comes in the next patch (D144008), making all the globals handled in
a single place, together with other global and local entities.