Segments API: Support merge id on segments (groups segments being merged)
Return a merge_id element in each segment of the segments API, allowing to group segments that are being merged as part of a single merge and indicate which ones are being merged now.
closes #3904