Optimize thread switching a bit.

~2.5% improvement in Zettai Hero Project (while multithreading.)
Small warning fix.
Avoid overhead calling __KernelIdle().

~1.8% improvement in Zettai Hero Project.
Merge pull request #3178 from unknownbrackets/perf

Thread switching performance improvements