Structural evolution of iodine on approach to the monatomic state