Intel Corp has agreed to buy Altera Corp for $16.7 billion as the world’s biggest chipmaker seeks to make up…