Make tab of single selected instance show up again after load (#2165)

This does not yet handle active_tab magic which i'm afraid will be ugly.
Move resolve_tab directly into horizons.gui.tabs

This could be needed elsewhere.
Store (and reload) currently selected tab in savegames

This only happens for single-instance selections. The build menu and
other tabs or windows are not restored upon loading games.

We make an exception here because
(a) the selected instances themselves are already stored
(b) they are "selected" upon loading a savegame

Until very recently however, this selection did not show any
corresponding tab, just the colored range highlights.
I believe keeping track of what was selected in a savegame is correct,
player-expected behavior. We also show the tab menu now, so pulling up
the right tab is not far off. As a bonus, it means we can save and
reload a game in gui tests and expect these tabs to still be there.
Preserve multiselection tab upon reloading.

Together with other commits, this fixes #2165.
Merge pull request #2167 from unknown-horizons/load-selected-tab

Load selected tab