Update callout clients in the kernel area to use the callout API properly, like cv_timedwait(). Previously there was some custom sleepqueue code in the callout subsystem. All of that has now been removed and we allow callouts to be protected by spinlocks. This allows us to tear down the callback like done with regular mutexes, and a "td_slpmutex" has been added to "struct thread" to atomically teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and "SWT_SLEEPQTIMO" states can now be completely removed.
Summary of changes:
- Make consistent callout API which also supports spinlocks for the callback function. This has been done to allow atomic callout stop of "td_slpcallout" without the need of many kernel threading quirks.
- Shared lock support has been removed, because it prevents atomic stop of the callback function.
- A new API to drain callouts asynchronously has been added, called "callout_drain_async()".
- Updated timeout(9) manual page
- Optimise away "cc_bucket" and "cc_next" variables.