support for Qt5 and QGuiApplication, fixes and improvements

+ added support for Qt5 and QGuiApplication
+ added waitForIdle method to complete endSession request during application terminating
- fixed sendAppview method