kernel: Limit maximum priority penalty

The maximum penalty the thread can receive is now limited depending on
the real thread priority. However, since it make it possible to starve
threads with priority lower than that limit. To prevent that threads
that have already earned the maximum penalty are periodically forced
to yield CPU to all other threads.
kernel: Cancel penalty only if the thread actually waits

Require the thread to give up CPU for at least one time slice before
cancelling its penalty.
kernel: Force high priority threads to yield less often