thread: moved ThreadStatus/WaitType to header, added support for arg on CreateThread, added correct CPSR reset