Texas settles lawsuit over attempt to purge thousands from voter rolls