Role of the iodide–methylammonium interaction in the ferroelectricity of CH3NH3PbI3