The head of Maxima supermarket chain in Latvia has lost his job over controversial comments he made after the collapse of a shop in Riga.