Make the GC exception-safe

operator()() was already exception-safe so I just removed the comment
there. In alloc() though, the insert operation may have thrown because
of insufficient memory. This is now solved.