Goldman Sachs Profit Beats on Investment-Bank Gains