Sort SpriteManager sprites by their zorder.

Thanks to Kinsman for the fix.