Embattled Galveston district clerk resigns