adding keyboard input echoing thread

this requires a queue for keycodes read when keyboard
interrupts are fired as well as a thread wait queue for
waiting on keyboard interrupts to occur.
adding thread sleep functionality

this allows threads to delay much more efficiently
than counting timer ticks in a loop (eating CPU).
finishing up thread-local data functions.