[kernel] Delay clearing of priority bit

In most cases, There is a single thread at a priority level which most likely will re-join runqueue, So clear the bit only if we really have to. Additionally this causes compiler to optimise this part further (CSE) as list macro returns NULL only if list was empty and wraps around, another read of list head and tail is avoided.

The only downfall is that if the last/sole thread in the list blocks, we will waste a few cycles here.