sched: core: added the basics of the sched core

sched-core:
The scheduling core is the base of the scheduler, with the central
scheduling functions `schedule()' and `rq_schedule()'. These two
functions run the CPU time and are responsible for correct context
switches.

The `rq_schedule()' function takes the following actions:
	* It gets the current run queue;
	* Disables preemption;
	* Acquires the run queue lock;
	* It posts all events which have been posted from IRQ context;
	* Updates its clock source and times;
	* Checks if it has to do a context switch;
	* Switches context and enables preemption
	* Checks the NEED_RESCHED flag, and if set, runs again from step 1;

Apart from the `schedule()', the core also contains a bunch of queue
editing functions:

	* rq_add_thread
	* rq_remove_thread
	* raw_rq_add_thread
	* raw_rq_remove_thread
	* class_add_thread
	* class_remove_thread

The class_* functions add a thread to the scheduling class. All threads
have to be registered on a class (no matter if they're sleeping,
running, ready to run or waiting for a signal).

The rq_* functions add a thread to a run queue. All threads which are
ready to run or are running have to be on a run queue. All active CPU's
must have a run queue.

The raw_* functions do the same as the non raw functions, but they don't
try to acquire the run queue spin locks. These functions should only be
used from an already locked context (some parts of the scheduling core,
for example).

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