tabset: Activate next tab if active tab is closed. Activate previous tab
if the closed active tab is the last tab.
Merging origin/john/master-pending-tabset into master