add exit request in shutdown program, repair text_line

Without the exit request, the shutdown program will leave its terminal
messed up, because the term_exit() call is in application_exit().

text_line widget strangely adds its buffer by 1, removing the necessary
zero character. I'm not sure if this has a reason, but it certainly
breaks the widget. Also the convert between keycode and input character
is broken. Even now, symbols except dot(.) is not supported, neither
is the shift decorator.