Overhaul the tab selection logic

Since all tabs were enabled if there were any results (in https://github.com/alphagov/frontend/commit/98e46d50b52a80ffb4c77d6b568c6b9d318af41d )
the behaviour of tab selection has been suboptimal. If you had specified a tab,
it would be selected. However if you hadn't, it would default to the first tab,
even if that was empty and another tab had results.

The active tab is now decided in this order:
  1. user-selected tab (supplied in the ``tab`` querystring parameter)
  2. the first tab with results
  3. the first tab
Display "0 results" in tabs without results

This makes it clearer when the tab is empty.