Improved layout of CollapsibleWidget, TextBoxWidget.

Improves initial size calculation of CollapsibleWidget.
Fixes a crash in TextBoxWidget.Render() when trying to draw cursor in
an incorrect position, because layout wasn't done since content changed.