a new copy of State with the new IdsPerDestination.
Get the SortedMap relation between CorrelationId and DeliveryId for the given destination.
Compute the next correlationId for the given destination.
Compute the next correlationId for the given destination.
The computation is just the biggest correlationId + 1 or 0 if no correlationId exists.
a new copy of State with the IdsPerDestination updated for destination using the newIdRelation.