Revert "Revert "genalloc: stop crashing the system when destroying a pool""

This reverts commit cfe50e0f79d414b5d276131e5dcb9f6af503f70e.
misc: fix compiling for leo