mi_switch(): clean up switch types and their usage
Overall, this is a non-functional change, except for kernels built with
SCHED_STATS. However, the switch types are useful for communicating the
intent of the caller.
- Ensure that every caller provides a type. In most cases, we upgrade the basic yield to sched_relinquish() aka SWT_RELINQUISH.
- The case of sched_bind() is distinct, so add a new switch type SWT_BIND.
- Remove the two unused types, SWT_PREEMPT and SWT_SLEEPQTIMO.
- Remove SWT_NONE altogether and assert that callers always provide a type flag.
- Reference the mi_switch(9) man page in the comments, as these flags will be documented there.
Reviewed by: kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38184