CVS’s stock soared toward after its quarterly profit beat expectations by the widest margin in more than four years.