Deutsche Bank, asset managers and investors have agreed to settle their long-running dispute over the bank’s alleged failure to fulfill its obligations as trustee to more than 500 trusts backed by legacy residential MBS valued at more than $570 billion.