Bug 1036825 - Refactor tabs opening methods from tabs.js. r=aeftimie, r=hskupin