3D spectroscopy with VLT/GIRAFFE - III. Mapping electron densities in distant galaxies