Add reference removal to Sim

I don't see why one would want to use a swarmer once the Sim it refers to has been destroyed in the first place... but it's always nice to have segfaults when trying to access a NULL pointer rather than a pointer with a value.