Investing in all stocks, all the time—even in retirement—leads to higher returns than a mix of stocks and bonds. But it’s nowhere near a sure thing.