Elon Musk has taken control of Twitter and ousted the CEO, chief financial officer and the company’s general counsel, two people familiar with the deal said.