core/mutex: fix priority inheritance on AVR
core/mutex: fix priority inheritance on AVR

This fixes https://github.com/RIOT-OS/RIOT/issues/18545 as the code
previously relied on `sched_change_priority()` not directly scheduling
a new thread while IRQs are disabled, but rather later when IRQs are
restored. This is true for Cortex-M MCUs (where the PendSV IRQ is used
to trigger the scheduler), but not e.g. for AVR.

kaspar030/RIOT,ant9000/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,kYc0o/RIOT,kaspar030/RIOT,kYc0o/RIOT,miri64/RIOT,miri64/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,kYc0o/RIOT,RIOT-OS/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,ant9000/RIOT,ant9000/RIOT,miri64/RIOT,kYc0o/RIOT,miri64/RIOT,miri64/RIOT,jasonatran/RIOT,ant9000/RIOT,jasonatran/RIOT,jasonatran/RIOT,kYc0o/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,ant9000/RIOT,jasonatran/RIOT