switch thread instead of exiting context

lpm_sleep is always being called from within a thread context, not
from an isr context, therefore it should use thread_yield instead of
cpu_switch_context_exit.
handle stdin EOF
Merge pull request #34 from LudwigOrtmann/fix_native_handle_uart0_input

switch thread instead of exiting context, handle EOF