George Soros and Stanley Druckenmiller’s investment firms trimmed their holdings in “Magnificent Seven” stocks before this year’s ebullient run-up in technology companies gave way to a major downturn in mid-July.