Fix the GC total memory test.
This test was relying upon the result of GC.GetTotalMemory() returning a
greater number after allocating a large array. However, the array was
not kept live past the call to GC.GetTotalMemory, which resulted in this
test failing under GCStress=0xC (in which a GC is performed after each
instruction). This change adds the requisite call to GC.KeepAlive to
keep the allocated array live enough to be observed by
GC.GetTotalMemory.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b24a580d65272e7e29723d1665eb608dc973e8e