HPCC-12031 Always throw exceptions if cannot allocate enough memory

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
For backward compatibility with the previous regression tests.  (This is in the unit testing code.)