The distribution of ions under a charged monolayer, and a surface equation of state for charged films