Dorsey's exit marks a significant shift at the company, which has navigated years of pressure from investors who thought it did not make enough money and criticism from Washington.