Some fixes with queueing up Upgrades which cause the search to hang

The search would wait for upgrades so I put in more conditions.

BUG: search can be screwed up if searches are forced by killing of
critical units