Output snappiness improvements.
When the system checks for an incoming byte, if there's any pending output, send it immediately, bypassing the outbuf highwater mark. This allows the final non-full packet to be sent without waiting for the OutbufDrainTimeout (default 10ms), and makes a big difference when doing a large number of ANSI queries (send an ANSI code, wait for a response). There's a small but noticable placebo effect as well that makes everything feel smoother. This commit also cleans up the output thread where it pulls from the ring buffer into the linear buffer to take advantage of the new event-based ring buffers. Much easier to read now. Speaking of easier to read, this also includes some whitespace fixups.