Implemented fixes for instability introduced as a result of fixing the
closeEvent handling in order to clean up resources.
Merge pull request #28 from shotgunsoftware/tankqdialog_closeevent

#21126 - Stability fixes for the new closeEvent handling when used with old versions of the framework.  Also now correctly cleans up the hosted QWidget.