Move custom measure code out of main layout function
Move custom measure code out of main layout function

Summary: Try to move more code out of the main measure function

Reviewed By: gkassabli

Differential Revision: D4213302

fbshipit-source-id: df4bc43848325e99ad338a2fa6d5c9404315b0e6

facebook/yoga,facebook/yoga,facebook/yoga,facebook/css-layout,yihuang/css-layout,facebook/css-layout,yihuang/css-layout,facebook/yoga,facebook/css-layout,facebook/css-layout,rmarinho/yoga,rmarinho/yoga,facebook/css-layout,facebook/yoga,yihuang/css-layout,facebook/yoga,rmarinho/yoga,facebook/yoga,rmarinho/yoga,yihuang/css-layout,rmarinho/yoga,yihuang/css-layout,facebook/css-layout,yihuang/css-layout,facebook/css-layout,facebook/yoga,rmarinho/yoga,yihuang/css-layout,facebook/css-layout,rmarinho/yoga,rmarinho/yoga,facebook/yoga,rmarinho/yoga,yihuang/css-layout,yihuang/css-layout,facebook/yoga,facebook/css-layout,rmarinho/yoga,yihuang/css-layout