Transgender troops’ right to serve — perhaps even to fight and die for a nation they volunteered to defend — has been subject to a whiplash-inducing series of policy reversals and partisan squabbles and created uncertainty as to what they will confront in the coming years.