Simona Halep announced her retirement after her first-round defeat at the WTA Cluj-Napoca tournament in her native Romania.