The deal, valued at over $8 billion, comes amid a wave of consolidation in the highly competitive food-delivery segment.