Goldman Sachs and Morgan Stanley have reported strong profits in the fourth quarter, driven by a surging stock market and increased deal making.