[Bugfix] Make rendering cache more stable

As soon as QgsMapLayer::setCacheImage is called while rendering is active, a crash occurs.
Due to the fact, that processEvents is called from the main rendering loop, such situations cannot always be foreseen.

Fix: Abort rendering, as soon as setCacheImage is called.