Warren Buffett is a master at outperforming the market during bad times. Here’s what you can learn from his strategy.