physics: limit thread autodetection to 4

More than 6 causes instability.
pthreads: allow threads to exit themselves, do not destroy main thread on exit

I really need to fix my threading. I need to get all pthreads outside of main and use them only for the physics engine.