Afghans register to vote in long-delayed elections amid violence