fix warning when parsing stylesheet in qgsmessagebar:
avoid log message: "Could not parse stylesheet of widget .."
[spatialquery] shows the warning in message bar when no layer is loaded in canvas
[ftools] avoid trivial error for Random selection tool
[pyqgis-console] prepared API file update
[pyqgis-console] avoid processEvents for stderr output
[pyqgis-console] fixes #9097 (thanks to Minoru Akagi)