TUI: dump some old code that we no longer need, and avoid doing a full redraw when scrolling the screen up.
gears: don't try and render on an invalid mesa context
posix: only clean up events (which takes place inside a critical section) if we actually have events to clean up, to avoid locking overhead.
posix: don't halt until an IRQ fires whenever we yield, as this completely destroys performance