About 3,000 police officers and soldiers backed by helicopters and armored cars occupied one of Rio de Janeiro’s largest slums on Sunday.