Ion transport in porous media: derivation of the macroscopic equations using upscaling and properties of the effective coefficients