Fix heap corruption during stable name allocation
See Trac #15906 for the problem. To fix we simply call allocate() instead of
ALLOC_PRIM(). allocate() does not trigger GC when the nursery is full,
instead it extends it.
This validates. memo001 now passes with -debug compile parameter. I'll add
another test that runs memo001 with -debug once I figure out how to use
stdout files for multiple tests.
Reviewers: simonmar, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, carter
GHC Trac Issues: Trac #15906
Differential Revision: https://phabricator.haskell.org/D5342
(cherry picked from commit 691aa715cf43bf9d88ee32bca37e471bae35adfb)