auto merge of #553 : pcwalton/servo/cpu-rendering, r=pcwalton

r? @metajack
Optimize reflow by changing enums to traits and inlining more