improved logic to choose right window to show dialogs in

Better logic to get the window in which we should show any HockeySDK related controller. Also fixed a bug if user has more then one screen and the first of those screens is hidden.