Wait for any layout tasks to complete in a page tree before a handling a pipeline's exit message.
Make proxy finalizers retrieve the DOM object from the right slot.
Silence occasional task failure that occurs from sending to the render task after it's shut down.
auto merge of #1005 : jdm/servo/failfixes, r=metajack

Fixes #1004. I haven't seen the other ones be reported, but I saw often saw `task <unnamed> failed at 'RenderChan.send: render port closed', /home/jdm/sdb/servo/src/components/gfx/render_task.rs:76`, `task <unnamed> failed at 'receiving on closed channel', /home/jdm/sdb/servo/src/compiler/rust/src/libstd/rt/comm.rs:487`, and failed assertions due to layout running after we had begun tearing down the window.