Add an extra lifetime parameter to TElement / TNode

This isn't used for anything yet, but it's easier to propagate this
change in a separate commit.
Refine a lifetime parameter
Remove the 'static lifetime parameters from TElement methods

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

Fixes #2595.
Merge pull request #3501 from zwarich/telement-lifetimes

Remove the 'static lifetime parameters from TElement methods

Reviewed-by: jdm