State treasurer candidate fired from job for refusing to drop out of race