New York Times Co.’s chief executive Janet Robinson will be leaving the company at the end of the month—prompting the company’s internal and external search for her replacement.