Coca-Cola Co.’s rocky path as a Keurig investor has now taken an unexpected turn: The coffee company is becoming one of its biggest competitors.