Goldman Sachs reported a third-quarter profit of $4.1 billion, beating estimates as advisory fees jumped 60% amid a banner year for mergers and acquisitions.