When Satya Nadella took over as CEO, the company was lumbering and uncool. He cleaned up a toxic culture, crafted the deal of the decade, and put Microsoft back on top.