The visitors were stranded on Morro Dois Irmaos during clashes between police and Comando Vermelho, one of Brazil’s major criminal groups.