The Trump administration’s early moves are the culmination of a nearly decade-old campaign to roll back transgender rights.