Move thread.c/thread.h to libretro