sched: core: redisgned the kill/event queue.

The event and kill queuing has received a major overhaul, or actually -
queueing threads on run queue's in general has been completely
redisgned.

Run queue's now hold a specific RQ structure for the configured
scheduling algorithm. The round robin scheduler has `struct rr_rq' and
a deadline scheduler would get something similar, like `struct dl_rq'.
These structers hold the entity information of a run queue. The core
doesn't know, and doesn't need to know. They are driven by the
scheduling algorithm which has a uniform API, used by the sched-core,
stored in a `struct sched_class' (struct rq::sched_class).

Threads which are queued in an event mutex will be linked on the
wake_queue queue head using the rq::rq_list variable. The same is true
for threads which have to be queued to be killed, except that they use
kill_queue as a list head.

Signed-off-by: Michel Megens <dev@michelmegens.net>
sched: core: fixed a potential RQ bug

The RQ pointer in the `struct thread' data structure (struct thread::rq)
was potentially being violated by kill/wake queue editing functions.
Fixed by acquiring the current run queue as their destination run queue.

If that isn't their current RQ it will be removed from their current run
queue and reassigned to the run queue of the executing CPU. This might
introduce some thread bouncing on SMP systems, but the overhead is
minimal.

The 'currently running thread' is never violated and moved to another
run queue, because it already is on the run queue of the executing CPU.

Signed-off-by: Michel Megens <dev@michelmegens.net>