Thorsten Heins, the chief executive of BlackBerry, will leave after the collapse of a tentative takeover offer from BlackBerry’s largest shareholder, the New York Times reports.