As the end of the year approaches, some investors will turn to tax-loss harvesting. Here’s what you need to know first about the ‘wash sale’ rule.