Changed thread_set_priority to check if the current thread has highest priority. If not, we now make an immediate switch.