Density functional study of neutral and charged sodium and lead clusters in the jellium model