Brazil’s market selloff has delivered a stark warning to emerging-market investors: crowded trades can unravel with alarming speed.