Improved thread scheduling and fixed .cproject

Thread scheduling no longer requires the Lua registry and doesn't need that weird IF code.
Changed .cproject so that it uses a CDT internal builder instead of a Make build: CDT internal is faster