Fix uninitialized value in CachedAllocator

ExecutionConfiguration was querying device global memory size
before value was available

fixes #3148
Fix potential problem in Messenger related to MPI window