Take scrollTop/scrollLeft into account when positioning

When $element is position: fixed;, subtract scrollTop/Left
from the top/left coordinates, otherwise IME controls anchored
to inputs that are position: fixed; are mispositioned when the
page is scrolled.

Also take scrollLeft into account for computing overflowsOnRight.