Made sure items with preferred width of 0 could also stretch

If no stretch factors were specified, we used the preferred size as a
stretch factor. Obviously, that didn't work if the preferred size was
actually 0.

This patch works around this by actually setting the stretch factor to
1.0 if this is the case.
This should work fine in most cases, except for the case where there
are also other items with a preferred size close to 0.
In this case, the item with preferred size 0 will just grow
faster than an item with e.g. preferred size 0.1.

Task-number: QTBUG-31217

Change-Id: Id5a3e19c9cd756860fc4052daee3eb5582f39d0c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Don't implicit cast the enum to a bool

Casting a QLayoutPolicy::Fixed to bool was fine since that would return
false.
However, casting a QLayoutPolicy::Shrink to bool would return true,
which would give wrong results. (The conditions only want to check if
the item can grow).

There were no bugs because of this, simply because the Qt Quick Layouts
API does not allow setting *only* the shrink flag.
However, it would become a bug if we ever added such a feature.

Change-Id: I781aec85117f45e12e49ba27f7ed8f5724f71bd9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Update GroupBox to support contentItem

- Removed contentWidth and contentHeight since it is not needed
- Exposed contentItem so that it can be designable.
- Respect the implicit width or height of the contentItem if it is the
only item of the GroupBox. Otherwise childrenRect is used.
- Modified the style so that the style takes care of only the
padding size and not the entire size of the group box.
- Fixed flat and checkable appearance for custom style

Change-Id: I2c7ec4cb7d5e6f96863847e8d8d6d6f52428364e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>