layout: Refactor flow construction to move around large structs less.

5% perf win, and a net loss in lines of code.
auto merge of #1615 : pcwalton/servo/fewer-memmoves, r=larsbergstrom

5% perf win, and a net loss in lines of code.

r? @larsbergstrom