The deal between the chipmakers, whose fortunes have diverged sharply, includes plans to collaborate on technology to power artificial intelligence.