Adds SortedIteratingSystem

to iterate over the entities in an order defined by a comparator
This code can be factored out in a private method, since you're using it in `update()` as well.