Electronic structures and reactivities of iodinating agents in the gas phase and in solutions: A density functional study