#26605 Improved logic for indication of a UI present

This changes the meaning of the has_ui property so that it is consistent
with other engines. Previously has_ui would return True as soon as a
valid pyside/pyqt4 was detected. This is inconsistent with other
engines, where has_ui indicates that an active UI is present and
running. This pull request adjusts the shotgun engine so that has_ui
only returns true when a QApplication is actually active in the system.

Closes #2.