[patch] Cherry-pick 472950ecab88fc41a99f2a1deb861a4abd273174

Original commit message:

Author: Michael Brasser <michael.brasser@live.com>
Date:   Fri Jul 19 14:32:17 2013 -0500

    Fix crash when changing non-cached source of image during animation

    Ensure deferred deletions are handled while syncing, otherwise texture
    might be deleted after sync but before deferred deletion is processed.

    Task-number: QTBUG-32513
    Change-Id: Id276f536a5722a36baae815b7b550b574eeeb483
    Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>