L1 and L3 x-ray-absorption edges of iodine in AgI studied by multiple-scattering theory using complex potentials