The mortgage settlement was a political coup for President Obama and state attorneys general. For banks, it was merely the latest turn in a long and winding effort to put housing problems behind them.