Refactor document damage to distinguish it from layout/style damage.

Also, standardize on the name "reflow" instead of "relayout" or "build".