I think the easiest solution would be to implement a message system paired with a entity component system (ECS).
Every entity in the game should be able to send messages and subscribe to messages of interest.
For instance, if an entity A (a spaceship for example) targets an entity B (another spaceship) it would subscribe to messages from B. If B gets destroyed, it sends out a destruction message and A can therefore update it's internal state (remove all references to B).
Or, your other example: If entity A is part of a formation (also an entity, lets call it B again) it subscribes to B. If B gets merged into another bigger formation, B sends a merge message with the new merged formation, entity C. A can then update itself to belong to C.
The benefit of this is that the sender does not need to know who holds references to it. It just simply sends a message. Every entity that could be interested in it will have subscribed and just needs to respond properly.
A different benefit of the ECS design would be that you could reference the entities by less dangerous references. An entity is normally just a unique integer, so that referring to a non existent entity does not lead to a seg fault, but can be caught at runtime (and logged for later analysis).
I recommend taking a look at THE prototype of entity component systems, Artemis (written in Java) and an implementation of the messenger system (e.g. Angel2D, look for the class SwitchBoard and take a look at the Documentation, it explains how messages work).
Strange, I took a look at the source a couple weeks ago and was quite impressed. Cocos2d is one engine I might consider in lieu of rolling my own for a small project I have planned. The other engine I am looking at and appears easy to use is Angel2D.
Cool site btw, Serapth.