added tests + fixes for Actor.spawnThread()