Elon Musk, leaning on Skadden, Arps, Slate, Meagher & Flom for legal advice, struck a deal on Monday to buy Twitter, which turned to Wilson Sonsini Goodrich & Rosati and Simpson Thacher & Bartlett for its own legal counsel.