Applies existing fix to array allocation, Adds a test case, Adds a fallback mechanism, so that if allocation fails we shrink the next chunk size. Refs #2696. [SVN r69236]