Except for `get_attr()`, all methods have a definition that just needs `TElement`, nothing else is Gecko-specific. So add a `get_attr()` into `TElement` with different definitions for Gecko and Servo, and also add `get_tree_counting_result()` with a shared default implementation. Then the implementation of `ElementContext` for objects that also implement `TElement` can just redirect to `TElement`. Differential Revision: https://phabricator.services.mozilla.com/D309633