Fix window leak after changing Gerrit in preferences

By unregistering the gerrit instance listener in GerritControllerActivity
 when paused and re-registering it when resumed, the onGerritChanged
 function will only be called to refresh the tabs when there are tabs to
 be refreshed on screen.

Added some precautionary GerritTask dialog management.

GerritControllerActivity: Call PrefsActivity not Prefs in intent to open
 preferences (fix for previous commit)