Remove the 'static lifetime parameters from TElement methods

This improves the static correctness of layout's use of DOM nodes.

Fixes #2595.