ui: Remove redundant ui.h includes

Also move read_error_exit to os/input.c