UI events can specify `relatedTarget` themselves. These were correctly
initialized, but this wasn't the case for the base event they extend.
Therefore, we need to initialize the event `relatedTarget` and only
store this information once.
This fixes several `shadow-dom/` tests, which were using these UI events
to test behavior.
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>