Market swings can quietly reshape your nest egg, but there are ways to protect your retirement plan from losses.