doc: add detailed scheduler documentation

"Some functions that unlock another thread, e.g. msg_send() or mutex_unlock(), can cause a thread switch, if the target had a higher priority ()"