Better handling of iframes in the compositor tree

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