added spinning loop when terminating threads in internal tasking system
added spinning loop when terminating threads in internal tasking system

embree/embree,Sjoerdie/embree,Sjoerdie/embree,embree/embree,Sjoerdie/embree,embree/embree,Sjoerdie/embree,embree/embree