Without admitting any wrongdoing, Goldman Sachs has agreed to pay $60 million to settle a Massachusetts probe into subprime mortgages. Much of the money will go toward helping more than 700 residents in the state ease the terms of their loans.