fix targets not preserved in saved games

I iterate through all available thinkers and assign each an increasing 32-bit integer index starting at 1, so I get a unique assignment between a thinker pointer and its index. When saving a mobj_t in saveg_write_mobj_t(), each pointer in the mobj->target and mobj->tracer fields gets replaced by its corresponding index. When loading the game again, after all thinkers have been restored, this procedere is reversed and each index in the mobj->target and mobj->tracer fields gets replaced again with the corresponding new thinker pointer.

fixes #29