Scroll to view only when the item is not in view

This is an alternative fix for https://sourceforge.net/p/phpmyadmin/bugs/4169/.
The auto scrolling will not happen if the item is visible in the navigation. So when the user click a link in navigation no auto scrolling will happen.
However if a user selects a database/table from main panel and it is not visible in navigation, auto scrolling will bring it to view, since expanding the highlighting an item that is out of view it not useful.