should_yield() compares thread::td_swvoltick to 'ticks' to determine
whether a thread is hogging and should yield. Prior to this commit,
td_swvoltick recorded 'ticks' only /before/ the actual context switch.
Therefore, the calculation in should_yield() includeed any time that
the thread was switched out. It seems that should_yield() wants to know
how long the thread has actually been running.
Record 'ticks' in td_swvoltick after sched_switch() returns. Keep the
existing assignment, before sched_switch(), so that db_show_thread will
still show useful data for sleeping threads. Do the same for
td_swinvolticks. This is only for consistency, since it's only used by
db_show_thread at present.