import latest changes from 9front tree
move event handlers into separate functions
switch to libthread instead of libevent
change dark mode colors to better fit rio
add scroll to position using mouse2 in scrollbar
fix relative path plumbing (thanks qwx)
do not reset scroll position upon window resize (thanks qwx)
add line scrolling using up/down arrows
use explicit colors for background and foreground
fix utf8 not rendering properly (thanks igor)
handle patch using a/ and b/ as filename prefixes
add scrolling via mouse 1 and 3 on scrollbar (thanks nicolagi)
add right-click to plumb to line location
truncate and add ellipsis to long lines