The refactor patch removed a try/catch block that would have caught this
error before. Instead of using try/catch, this patch checks for the
affected items and send an error when the items are missing.
Convert events used in AccountsHelper to bundle events. Most events are
kept as Gecko thread events, but a couple events that start activities
are converted to UI thread events.
These events are not accessed through GeckoApp, and should therefore use
the global EventDispatcher rather than the per-GeckoApp/GeckoView
EventDispatcher. Otherwise, we could run into situations where we end up
registering / unregistering the same event using different
EventDispatcher instances, causing exceptions like this one.