Goldman Sachs profit soared in the second quarter, driven by strong trading and dealmaking performance.