Better handling of iframes in the compositor tree

This is a rework of Bryan Bell's original PR from https://github.com/servo/servo/pull/2943. It splits the single commit into independent pieces, preserves the existing "root layer + base layer" compositor tree layout, and includes miscellaneous other cleanup.