PopupWidget: Position anchor relative to popup, not popup relative to anchor
Also don't use margins to adjust the position for anchor placement and
dodging edges, but instead modify FloatableElement's position calculations
(which have been factored out into a separate method).
What's nice about this approach, though, is that this lets us use
FloatableElement's "before" positioning for backwards popups
(which initially positions them too far away but then corrects for that),
and that the margin corrections on the anchor for e.g. inset icons
on PopupButtonWidgets are now separate from the positioning corrections for
the whole popup, so these adjustments can be applied directly on the anchor
without @noflip and work in RTL.