Carlos Tavares, the chief executive of struggling automaker Stellantis NV, resigned Sunday, after nearly four years of leading the company.