Fix size calculation issue

Widgets that require a size calculation were stored in order of
depth, since the calculation has to be done bottom-up. However,
this was not being properly done since the depth registered when
the resize request was made may have changed when the calculation
is done. Now, the widgets are ordered by depth just before doing
the size calculation.
Fixe size calculation of Placement

The padding must always be included in the preferred size, even
if there is no child widget
[Mac] More size calculation fixes

ResetFittingSize now sets a flag instead of doing the size
calculation, which is now delayed until the size is requested.
Removed some hacks to support widget margins which are not
required anymore
[Mac] Fix resizing issues in Expander