Alright, I'll try to simplify it even further.
You'll need two triggers and one variable.
The var is a unit-type variable, we'll call it unittypeSpawn.
One trigger spawns the unit-type, and the other upgrades the unit-type.
The spawner should run every x.xx seconds, and merely create 1 unittypeSpawn for Player X at a location.
The upgrader should run whenever someone researches the unit-type upgrade, and should set unittypeSpawn to the new unit-type.
This way, whenever the unit is spawned, you don't have to run through and check all the upgrades; you just create whatever unit has been stored as the kind of unit the upgrade is set to.