UnitedHealth’s Optum unit has signed a multiyear agreement with Merck to develop a better way to reimburse drugmakers.