Fixed object drawing order for image saving and mini-map

Currently objects are always drawn top to bottom. For the regular map
view this is taken care of by setting the 'z' property of the items
to their 'y' coordinate. However, when saving as image or when rendering
the mini-map, the objects need to be sorted manually.