As struggles between traffickers, other criminals and police have intensified, residents fear Rio could return to sort of violence common in decades past, when parts of the seaside city resembled war zones.