estimate_and_apply_delay function

Estimate and apply delay from a reporting triangle