A suicide attacker struck an office where Afghan voters were lined up to register, raising concerns that violence will tarnish long-delayed elections.