Bug 1419947 - Extend tabbrowser to track and use tab successors; r=dao
The successor of a tab is similar to the owner of a tab, in that if an active
tab is closed, the successor will be activated next. The differences are that
successor always defaults to being unset (an extension can set it through a
not-yet-implemented API), whereas tabbrowser sets owner to be the opener of
background tabs; successor is always consulted when an active tab is closed,
whereas the use of owner is gated by a pref; and when a tab is closed, hidden,
or moved to another window, any tabs whose successor is the affected tab
inherit that tab's successor, whereas in the parallel situation with owners,
the owner of such tabs is simply set to null.
Differential Revision: https://phabricator.services.mozilla.com/D4731