Transporting random measures on the line and embedding excursions into Brownian motion