Various code cleanups
Fix fit-to-width zoom mode with Ubuntu scrollbars

Ubuntu scrollbars are overlays that take up no width in layout, so 0 is
a valid scrollbar width for fit-to-width mode. Check for non-negative
instead of nonzero values.