An avalanche of selling on Friday crushed stocks. It was a dramatic reversal from record highs earlier in the week.