Properly protect access to pixmap reader thread with mutex
Previously, access to the reader thread wasn't guarded properly,
causing a crash when the reader thread was deleted prior to
QDeclarativePixmapData (which then attempted to dereference the
thread pointer to cancel the request). This commit adds locking
to ensure that access to the reader is protected properly.
This commit also fixes an issue where if a QDeclarativePixmapData
was deleted after its QDeclarativePixmapReply was removed from the
jobs queue but prior to processing, a pointer to the data could
be dereferenced as part of processing, but caching the required
information in the reply.
Task-number: QTBUG-22125
Change-Id: I32aa2ca41a297b48e68cb358f4aa4fafd999f215
Reviewed-by: Martin Jones <martin.jones@nokia.com>