Eat cycles and reschedule in some rtc funcs.

Reported to fix #2146.
Eat some cycles when changing thread priority.

Some games call this a lot.
Merge pull request #4661 from unknownbrackets/perf

Minor perf tweaks (won't help many games)