Twitter Inc.’s former chief executive officer revealed the U.S. Justice Department and the U.S. Securities and Exchange Commission investigated the social-media platform in the past as part of his effort to force the company to cover legal fees related to lawsuits and government probes.