Goldman Sachs enlisted a team of white-collar defense partners from five large firms as it came under scrutiny in a foreign bribery investigation that culminated Thursday with the bank agreeing to pay more than $2.9 billion as part of a record-setting global resolution.