integrated changes from
https://github.com/commontk/PythonQt#patched-2
renamed errorOccurred() to hadError()
renamed resetErrorFlag() to clearError()
added optional system exit handler
added iatty method
git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@242 ea8d5007-eb21-0410-b261-ccb3ea6e24a9