The riotous actions of a pro-Trump mob amid a shift in legislative power sharpened the focus on the outsize roles Facebook, Twitter and other tech companies play in the country’s social fabric and economy.