Texas’ top election official resigns after midterms