Add some very basic free list support to the shared memory allocator.

It's stupid and inefficient but it'll be fine for my current hacking.