Afghans go to polls amid security threats