separate a resize pass into three parts

this separates the resize past into three parts: compute, apply, and
after. This allows DOM reads and writes to be separated into distinct
passes for each group of sibling widgets, reducing the number of DOM
reflows.