Pairing interaction and self-consistent densities in neutron-rich nuclei