Just Eat has agreed the sale of Grubhub at an eye watering discount to the $7.3billion it paid for the struggling US food delivery business just three years ago.