Dissipation-induced Tonks-Girardeau gas of polaritons