Gina Hinojosa won the Texas governor’s race, scoring Democrats a victory in a state long controlled by Republicans.