Fixed segfault, security error.

The segfault was weird. I fixed it anyway.

The security flaw was complicated. When someone dies, all of the indices
in every unit and on the map change. If you notice this, then you will
know that a unit died. You also know the player of that unit.

Now, dead units remain in allUnits as a NULL pointer. At certain
intervals, allUnits is reformatted and all of the NULL members are
deleted. This occurs with some randomness, so that it doesn't occur
exactly on the frame of a death.

Also, previously and now, storing indexes of a unit in allUnits is
ILLEGAL. DO NOT DO IT. If you do, you risk long term errors. Before
they'd be evident pretty soon, though hard to find. Now they will be
nearly IMPOSSIBLE to find, and only happen if you legitimatly run the
universe for hours, with thousands of births and deaths.

DO NOT STORE INDEXES OF THINGS IN ALLUNITS. (This is pertinent only to a
AI. Within the engine, you can update the indexes upon reformatting.)

Allow me to repeat: DO NOT EVER UNDER ANY CIRCUMSTACES STORE AN INDEX OF
SOMETHING IN ALLUNITS WHILE WRITING YOUR AI. EVER. AT ALL!!! IT WILL
CAUSE YOUR PROGRAM TO DIE, AND YOU WILL NOT NOTICE FOR A LONG TIME, AND
THEN YOU WILL NEVER EVER EVER FIND THE BUG.
Thank you.