Merck to spend $6.7 billion to buy Terns Pharmaceuticals, which is developing an oral treatment for leukemia.