physics: rewrote threadcontrol, no longer stalling with >100000 objects

Better to use a case. Looks tidier. I couldn't get rid of thread_obj global pointer, but that doesn't matter as it's only global to the scope of physics.c. Also, the problem with the slow startup was that createlinks() was always initially scanning all objects which takes a really long time. Now, we check if novid is toggled before doing that. I'm going to do work on the quadtree system tommorow. If I can keep my eyes off that damn book for a few hours.