Some retirees face a survivor’s penalty on their taxes after a spouse dies. Here’s how to prepare, advisors say.