Prevent hiding of fields when clicking on an index twice

When managing index patterns, the URL it sends you to when you click on an index pattern does not specify the tab to show (fields or scripted fields). So, when the controller loads, it checks to see if a tab is specified in the URL, and if not, it selects the first tab by default. However, when you click on an index pattern that's already in view, the controller does not run again, so the selected tab is lost, so no tabs are shown.

This fix changes the controller to watch the tab specified in the URL, and any time the tab isn't specified, it selects the first tab.

Closes #2052.