The appeal turns on whether a religious university may enforce a doctrinal code against an employee who came out as transgender without violating federal sex-discrimination law.