move emit of collisions to after done moving entities, so that callbacks can delete entities