Refactor global heap definitions into .cpp.

This change is a precursor to more modules using the heaps that were
previously defined in libgallocy.h. This prevented multiple modules from
including this header by introducing multiple symbol definitions.