DesignTime: Compute the size of the collapsed text correctly from start. DO NOT MERGE

CollapsingToolbarLayout has a mDummyView field which computed bounds is
used for the collapsed bounds of the mCollapsingTextHelper.
The initial size is currently computed wrong (will be empty) because the
mDummyView is added during CollapsingToolbarLayout.onLayout().
This CL makes sure that mDummyView is added before the first layout phase
such that the correct size is computed during the first layout.
This fix allows LayoutLib to create a collapsed App Bar where the text
is rendered in the correct size.

Change-Id: I4f56ffe05bb9a9fa533e00a80edb737e13937af9
(cherry picked from commit 33970bf6064d060cdf5a5a4a9fb9286269de6752)
diff --git a/design/src/android/support/design/widget/CollapsingToolbarLayout.java b/design/src/android/support/design/widget/CollapsingToolbarLayout.java
index b2b55f7..7c09925 100644
--- a/design/src/android/support/design/widget/CollapsingToolbarLayout.java
+++ b/design/src/android/support/design/widget/CollapsingToolbarLayout.java
@@ -313,6 +313,12 @@
     }
 
     @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        ensureToolbar();
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+    }
+
+    @Override
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
 
@@ -332,8 +338,6 @@
             getViewOffsetHelper(child).onViewLayout();
         }
 
-        ensureToolbar();
-
         // Update the collapsed bounds by getting it's transformed bounds
         if (mDummyView != null) {
             ViewGroupUtils.getDescendantRect(this, mDummyView, mTmpRect);