Revert "Revert "Don't obscure the last line of the editor with the horizontal scrollbar""

This reverts commit 1d634e471ead97be77e81586288dce561e7e9c24.
Update scrollTop to valid position when scrollbar disappears
Respect horizontal scrollbar when rendering the vertical, and vice versa

We set overflow to hidden in the opposite scroll direction only if we
can't actually scroll in that direction, causing the white square where
neither scrollbar overlaps to appear at the lower right corner.
Fix specs that broke when accounting for horizontal scrollbar height
Remove logging
Update line number padding when max digits changes
Remove stray return in spec
Account for gutter width in scrollWidth of horizontal scrollbar

Because the scrollbar now spans the entire editor but the scrollable
area does not include the gutter, we need to add the current width of
the gutter to the scroll width of the horizontal scrollbar to allow
it to scroll to the end of the longest lines.
Don't obscure last character of long lines with vertical scrollbar

This entailed quite a few changes to dial in scrollbars. The scrollbars
are now adjusted in size to account for the width of the opposite
scrollbar. If the width or height are not explicitly constrained and we
are scrollable in the opposite direction that is constrained, we account
for the width of the opposite scrollbar in assigning a natural height
or width based on the content.
Don't allow spec window size to interfere with the size of the editor
Add a dummy scrollbar corner

Horizontal / vertical scrollbars render a 'corner' on the lower right
when they would otherwise overlap. I previously relied on drawing both
dummy scrollbars at their full width/height so the corner got rendered,
but that interfered with the display of the horizontal scrollbar in
certain circumstances because it was too wide to scroll. This commit
provides that behavior with an absolutely positioned div with the same
dimensions as the intersection of scrollbars when both are visible.
Hide scrollbar when not scrollable in a given direction
Explicitly assign dummy scrollbars to the correct width/height

Previously, dummy scrollbars were always 15px wide/tall. This caused
them to obscure the ability to click for the entire 15px region, even if
the actual scrollbar was styled to be much thinner. Now we explicitly
measure the size of scrollbars on mount and when the stylesheets change
and set the height/width explicitly.
Hide and show scrollbars before measuring them after stylesheet changes

We measure the scrollbar-corner node when there's a stylesheet change,
but Chromium won't apply the new style if it was already visible before
the change. This commit hides and shows it before measuring so we get
accurate values.
Default scrollbar height/width to 15 when it's measure as 0

A 0 measurement indicates that overlay scrollbars are enabled, so we
just fall back to 15px in that case so the user can hover directly over
the scrollbar to scroll.
Emit stylesheet-added/removed from ThemeManager w/ CSSStyleSheet objects

This enables subscribers to detect not just that stylesheets have
changed, but specifically how they have changed. This is used by the
React editor component to only refresh scrollbars when a stylesheet
that actually contains selectors for scrollbar elements is added or
removed.
Only refresh editor scrollbars on stylesheet changes that require it

If a stylesheet is added or removed, we check if it contains a selector
for scrollbars before refreshing anything.
Refresh scrollbars when overlay/classic style preferences changes
Base the visible lines on the height instead of the clientHeight

Because overlay scrollbars are invisible unless scrolling and even
regular scrollbars can be transparent.
Merge pull request #1923 from atom/ns-fix-scrollbar-overlap

Refine scrollbar interactions