toplevel, codegen: introduce gc_malloc

It's potentially imprecise, but we want to preserve the malloc()
interface quite badly.