more efficient preorder DOM traversals
auto merge of #3744 : cgaebel/servo/efficient-preorder-traversal, r=pcwalton

This also tackles some nearby FIXMEs. `traverse_preorder` is used in a LOT of
DOM functions..

r? @pcwalton