Congress changed the rules for when beneficiaries must take money from inherited IRAs, 401(k)s, and other retirement accounts. Here’s how to avoid the most common traps.