Initial sceKernelRotateThreadReadyQueue().

Might not be right but it's closer.
Makes games that call this func much faster.
Fix completely wrong thread status switching.

Wow, kinda surprised this even worked...
But now things that use sceKernelRotateThreadReadyQueue are broken again.
Start the root thread as running, properly.
Keep running threads at the top of the list.

There we go, this seems more right.  Switched to a std::list too.
sceKernelRotateThreadReadyQueue(0) means current.
Return an error for invalid priority.
Only switch to a started thread if better priority.
Merge pull request #634 from unknownbrackets/thread-funcs

Implement sceKernelRotateThreadQueue() + queue fixes