code: Remove deprecated calls to alloca().

The alloca() function is deprecated and, according to the man, sometime buggy
for some platform. The calls are replaced by Z_Malloc() / Z_Free() pairs.

Chocolate DOOM did the same.