The years right before and after retirement are extra risky for investors, experts say. Here’s how to navigate them.