[pc] Make platform_read_key idle on wait queue.

Fixes hack in dgetc using arch_idle. Now platform_read_key uses a wait
queue to sleep until a key is available in the key buffer, allowing the
idle thread or other threads to run. Since the idle thread gets a chance
to run, idle time accounting is now unbroken.
2 files changed