[WPF] Fix window sizing issue

The GetSystemMetrics API is known to return incorrect values for window
frame size metrics in some cases, due to a workaround in the Windows API
to support legacy applications running on Aero.
Instead of using that API to calculate the client area of the window,
we now rely on the size returned by the content. This requires some tricks
to force the window to adapt to content size changes.
Fix Box size calculation issue

When calculating the size of a Box, allow returning a size bigger that the
provided constraint if the box doesn't fit the constraint. This is required
for example when calculating the preferred size of a window when it already
has a specific width and height.
[WPF] Box sizing optimization

Only recalculate the desired size of children when its location changes.
Don't do it on ArrangeOverride since it may enter on an infinite loop
of arrangements.
[WPF] Paned sizing improvements

Don't constraint the height of panels in horizontal layouts
(and width on vertical layouts)
[WPF] Changed the way window size is calculated
More Window size calculation fixes

Subtract the size of the decorations from the available size used to
calculate the preferred size of the root widget.
[WPF] Minor sizing fix for BoxBackend

Looks like after all an UpdateLayout call is required after arranging
each child.
[WPF] Don't show the dialog button bar if there are no buttons
[WPF] Don't crash if there is no adorner layer for TextEntry
Merge remote-tracking branch 'origin/wpf-fix-window-size'