Make map:get_entities() return an iterator (fix #249).