Texas Attorney General Ken Paxton on Tuesday struck a deal with prosecutors investigating him for felony securities fraud, closing a legal saga that has dogged the state’s top law-enforcement officer and close ally of former President Donald Trump for nearly a decade.