Fixed potential memory issues in SpriteItem

* mSprite started as an uninitialized pointer
* It was always being dereferenced in the destructor
* There was no proper cleanup when the sprite ref was changed