consolidateStaticMemory: generate only one load for private memory struct
consolidateStaticMemory: generate only one load for private memory struct

This reduces the amount of loads in the IR; it is OK to load the value
only once as it never changes after the kernel has been entered.

This makes the resulting IR more readable.

toaarnio/llvm-ir-memprotect,toaarnio/llvm-ir-memprotect,toaarnio/llvm-ir-memprotect,toaarnio/llvm-ir-memprotect