kernel - Fix panic related to kqueue-based timers
* Fix a panic related to kqueue-based timers. When a knote is destroyed it
is possible for the callout_stop() to race a callout on another cpu that
is blocked on a lock.
* Introduce callout_terminate() which stops a callout and ensures that no
function calls for the callout is still in progress before returning.
The kevent code now uses this function instead of callout_stop().
* We can't have this assurance for the normal callout_stop() function because
it can deadlock a backend stuck waiting for a lock when a frontend holding
that lock calls callout_stop().
Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>