Plans to ring two favelas (slums) in Rio de Janeiro with a three-metre (10-foot) wall have been condemned by human rights groups and the city's own mayor.