Judges reject requirement for trans people to remove reproductive organs for state-recognised gender change