Fix #7927 : Add a warning message if trying to print a composition 

Fix #7927 : Add a warning message if trying to print a composition as an image fails (Qt's QImage sanity check for memory overflow) Moved previous commit from core/qgscomposition to apps/qgscomposer as QGIS server uses qgscomposition.