The investigation in #37745 revealed that `Element::create` spends ~39%
of its runtime in `set_custom_element_state`. For uncustomized built-in
elements, this overhead is unnecessary as according to the spec, they
are equivalent to being initialized in the "uncustomized" state.
Although our rust implemention also initializes the elements in
"uncustomized" state, this particular call to `set_custom_element_state`
can't simply be removed as this call also ensures that the element's
DEFINED state is set to 'true', to match the `:defined` selector, based
on the custom element state.
So, introduce a new method that will only set the
`ElementState::DEFINED` flag by manipulating the state directly and call
it from `Element::create` when creating uncustomized, built-ins.
For more information about the peformance improvements, please refer to
[this comment][1].
[1]: https://github.com/servo/servo/issues/37745#issuecomment-3305477287
Testing: There should be no functional change, so this is covered by WPT
suite.
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>