Silicon Valley firms were prepared this week to quickly block video of an Islamic State militant beheading an American journalist after a previous video by the same group showing the death of James Foley ricocheted through social networks in what was seen by some as a propaganda coup for the extremists.