Allow layers to mask children to their boundaries

This allows preventing iframes from overlowing their boundaries. We
also ensure that buffer requests are made for child layers, even when
their parents don't overlap the window rect. This is because children
can lie completely outside the bounds of their parents.
This was for correctness, since this PR implies that, by default, layers can lie completely outside their parents. I think it is unrelated enough that it should be moved to a later patch though -- with some additional logic to avoid doing too much work when masks_to_bounds is active.