Rectangle class and some modifications

Added a Rectangle class. Made some modifications in the World class to
easily pick objects from the collection. Also added a z-index sorter, so
that the objects are drawn in the correct order: closer-by objects
should be drawn over farther objects.