Electronic structure and diffusion paths of Ag ions in rocksalt structured AgI